GeoJSON Layers

Load GeoJSON data directly from a URL. Toggle the checkbox to display recent earthquake data from the USGS, styled by magnitude with an interactive popup. Click any earthquake to see its details.

About this sample

This GeoBlazor sample, written in Blazor for .NET developers, demonstrates the GeoJSONLayer from the ArcGIS Maps SDK for JavaScript exposed through GeoBlazor's GeoJSONLayer Razor component. The page shows a 2D dark-gray world basemap centered loosely on the Pacific. Above the map are a Show Earthquakes checkbox and a Data Source dropdown with options Past Month, Past Week, and Past Day. Toggling the checkbox loads a live USGS GeoJSON earthquake feed for the chosen period; the dropdown rewrites the feed URL and the layer reloads. Earthquakes are drawn as orange SimpleMarkerSymbol circles whose size is driven by a SizeVariable on the magnitude field (mag), so larger quakes appear as larger dots, and the layer is sorted descending by mag so big events draw on top. Clicking any earthquake opens a PopupTemplate showing magnitude, type, location, and time. A LegendWidget anchored to the bottom-right of the map documents the size ramp. The sample is intended to demonstrate consuming a remote GeoJSON feed with data-driven rendering 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.