Widgets

Use the checkboxes to toggle various widgets on/off. Notice that Widgets can be placed on top of the map, or outside the map, as in the case of the Basemap Gallery.

About this sample

This GeoBlazor sample, written in Blazor for .NET developers, demonstrates a gallery of widgets from the ArcGIS Maps SDK for JavaScript exposed through GeoBlazor Razor components including LocateWidget, SearchWidget, BasemapToggleWidget, BasemapGalleryWidget, LegendWidget, ScaleBarWidget, HomeWidget, CompassWidget, BookmarksWidget, and MeasurementWidget. The page shows a 2D navigation basemap centered over the North Atlantic at zoom level 2. Above the map is a panel of ten labelled checkboxes for Locator, Search, Basemap Toggle, Basemap Gallery, Legend, Scale Bar, Home, Compass, Bookmarks, Distance Measurement, and Area Measurement 2D, plus an empty gallery-box div that hosts the Basemap Gallery outside the map when its checkbox is on. Toggling each checkbox shows or hides the corresponding widget, with the Locator and Home and Compass and measurement widgets anchored top-left, Search and Legend and Bookmarks anchored top-right, the Basemap Toggle anchored bottom-right (toggling to ArcGIS imagery), and the Scale Bar anchored bottom-left. Enabling Bookmarks programmatically loads three preset bookmarks (Angeles National Forest, Crystal Lake, Mt. Waterman) into the widget. The sample is intended to demonstrate composing and toggling many ArcGIS view widgets in a Blazor application without writing JavaScript.

🚧 Heads up: Some samples are currently offline due to a token issue with ArcGIS. We are working with ESRI to resolve.