We're excited to announce GeoBlazor 4.6, available now for both GeoBlazor Core and GeoBlazor Pro. This is a substantial release: strongly typed browser geolocation, a streamlined geocoding API, clearer geometry editing results, new geometry and popup components for Pro, and a round of reliability improvements that make the map components more predictable to work with. Let's walk through what's new, then cover the breaking changes to review before you upgrade.
What Are the New Features in GeoBlazor 4.6?
GeoBlazor 4.6 adds new capabilities across both packages:
- Strongly typed browser geolocation:
LocateWidget.Locate()now returnsIGeolocationPosition?with structured coordinate, accuracy, altitude, speed, and heading properties, backed by newIGeolocationCoordinatesandPositionOptionstypes. No more parsing raw JSON strings. - A streamlined
LocationService: the geocoding methods (AddressesToLocations,AddressToLocations,LocationToAddress,SuggestLocations) are consolidated into single methods with optional parameters andCancellationTokensupport throughout. - Named geometry edit results:
RemovePath,RemovePoint, andRemoveRingreturn dedicated result records (RemovePathResult,RemoveRingResult, and so on) instead of value tuples. They're more readable and easier to debug. GetLayer()andSetLayer()onMapComponent: these now live on the sharedMapComponentbase class, so any layer-bearing component can retrieve or set its layer at runtime.MultiPartToSinglePartOperator(Pro): a new geometry operator that splits multipart geometries into single-part geometries.RelationshipElement(Pro): a new popup relationship element component.
How Does GeoBlazor 4.6 Make Maps More Reliable?
Several changes target the rough edges that show up when layers and widgets are wired together at different points in the component lifecycle:
- The
SketchWidgetstays bound to its graphics layer. When the widget's layer reference is assigned after the first render (a common pattern, where an@reflater replaces a placeholderGraphicsLayer = new()with the real map instance), the resolved layer instance is now treated as the source of truth. The toolbar tools stay enabled regardless of when the layer reference is assigned. - Layer-by-id binding resolves after a late layer add. Components and widgets bound to a layer by id (for example a
SketchWidgetwithLayerIdorGraphicsLayerId) now correctly resolve the layer and push it to the underlying ArcGIS JS object when the layer is added to the map after the component first renders. GeometryEngine.Unionreturns a fully populated geometry. The unioned result comes back with a populatedExtent, so calls likeview.GoTo(union.Extent)work as expected.- Runtime
SnappingOptionsupdates work inside theSketchWidget. Calls such asSnappingOptions.SetEnabled(true)andSnappingOptions.SetLayer(...)now apply at runtime instead of failing, andSketchWidget.SetLayer(...)keeps the widget'sLayer,GraphicsLayer, and their ids synchronized.
What About the FeatureTableWidget?
GeoBlazor Pro's FeatureTableWidget gives your feature layers an interactive, spreadsheet-style view, with sorting, filtering, row selection, attachments, and CSV export, all kept in sync with the map. It's a big enough topic to deserve its own walkthrough, so we'll cover it in depth in an upcoming post, including layer binding, extent filtering, action columns, related records, and spatial selection with the SketchWidget.
What Are the Breaking Changes in GeoBlazor 4.6?
This release includes several breaking changes. The most notable ones:
- Popup content types renamed:
AttachmentsContent,FieldsContent,MediaContent,TextContent, and the rest are nowAttachmentsPopupContent,FieldsPopupContent,MediaPopupContent,TextPopupContent, and so on. Groundmoved namespaces: fromdymaptic.GeoBlazor.Core.Modeltodymaptic.GeoBlazor.Core.Components, and several of its members are now settable.MapColoris now immutable:RgbaValuesandHexOrNameValueare read-only after construction,Clone()was removed, andGetHashCodenow hashes array contents soMapColorworks correctly as a dictionary key.- The Locate widget geolocation API is strongly typed:
Locate()returnsIGeolocationPosition?(wasstring?), and the geolocation options usePositionOptions?. Code that passed or parsed raw JSON strings must update. GeometryEnginemultipart-edit return types changed:RemovePath,RemovePoint, andRemoveRingreturn named records instead of value tuples, so callers that destructured the old tuples must update.LocationServiceoverloads consolidated into single methods with optional parameters, andLocateWidgetis now a Razor component rather than a code-only class.SketchWidget.GetLayer()andSketchViewModel.GetLayer()now returnTask<Layer?>(inherited fromMapComponent) instead ofTask<GraphicsLayer?>. If you assigned the result to aGraphicsLayer, read the still-presentGraphicsLayerproperty directly, or cast the result with(await sketchWidget.GetLayer()) as GraphicsLayer. Passing aGraphicsLayertoSetLayer(...)is unaffected.
A few types were also removed (including MissingMapViewReferenceException and IAttributeTableTemplateElements). We recommend reviewing the Core Release Notes and Pro Release Notes in full before upgrading.
Try It Yourself
GeoBlazor Core 4.6.1 and GeoBlazor Pro 4.6.1 are available now on NuGet:
- GeoBlazor Core on NuGet
- GeoBlazor Pro on NuGet
- GeoBlazor Samples
- Full Core Release Notes
- Full Pro Release Notes
Frequently Asked Questions
What is new in GeoBlazor 4.6?
GeoBlazor 4.6 (Core 4.6.1 and Pro 4.6.1) adds strongly typed browser geolocation for the Locate widget, a streamlined LocationService with CancellationToken support, named geometry edit result records, the MultiPartToSinglePartOperator and RelationshipElement components in Pro, and GetLayer() and SetLayer() on the MapComponent base class. It also brings reliability improvements to the SketchWidget and to layer-by-id binding, including runtime SnappingOptions updates such as SetEnabled(true) inside a Sketch workflow. GeoBlazor Pro's interactive FeatureTableWidget is part of this release as well.
What are the breaking changes in GeoBlazor 4.6?
The popup content types were renamed (for example, FieldsContent is now FieldsPopupContent), Ground moved from the Model namespace to the Components namespace, MapColor is now immutable, the Locate widget's geolocation API is strongly typed, the GeometryEngine multipart-edit methods return named result records instead of value tuples, the LocationService overloads were consolidated, LocateWidget became a Razor component, and SketchWidget.GetLayer() and SketchViewModel.GetLayer() now return Task<Layer?>. Review the Core Release Notes and Pro Release Notes before upgrading.
How do I upgrade to GeoBlazor 4.6?
Update the dymaptic.GeoBlazor.Core NuGet package to 4.6.1. GeoBlazor Pro users should update dymaptic.GeoBlazor.Pro to 4.6.1 at the same time, since Pro 4.6.1 is built against Core 4.6.1 and the two packages are meant to be upgraded together. Review the breaking changes first, as several public types and method signatures changed.
Does GeoBlazor 4.6 include the FeatureTableWidget?
Yes. The FeatureTableWidget is an interactive, spreadsheet-style attribute table for feature layers, and it ships with GeoBlazor Pro, the commercial extension package. It supports sorting, filtering, row selection, attachments, and CSV export, all kept in sync with the map. We'll cover it in depth in its own dedicated post coming soon.
