Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,18 @@
new("https://developers.arcgis.com/javascript/latest/sample-code/basemaps-portal/", "ArcGIS Maps SDK for JavaScript"),
];

public override string Description =>
"This GeoBlazor sample, written in Blazor for .NET developers, demonstrates how basemaps in different " +
"spatial references reproject the entire view, using the BasemapGalleryWidget and PortalBasemapsSource " +
"components from the ArcGIS Maps SDK for JavaScript exposed through GeoBlazor's Razor component model. " +
"The page opens with a 2D map of the world centered roughly on North America. In the upper-right corner " +
"of the map an ExpandWidget shows a basemap icon; clicking it expands a Basemap Gallery panel populated " +
"from a curated ArcGIS Online portal group containing basemaps in a variety of projections. A small " +
"CustomOverlay in the lower-left corner displays the current MapView spatial reference WKID. Selecting " +
"any basemap from the gallery triggers the OnSpatialReferenceChanged event, the view reprojects, and " +
"the WKID readout updates live. The sample is intended to demonstrate how to swap basemaps and observe " +
"the resulting spatial-reference change reactively in a Blazor application without writing JavaScript.";

private Task OnSpatialReferenceChanged(SpatialReference spatialReference)
{
_spatialReference = spatialReference;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,18 @@
new("https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BasemapToggle.html", "Basemap Toggle API Reference")
];

public override string Description =>
"This GeoBlazor sample, written in Blazor for .NET developers, demonstrates the Basemap Toggle widget " +
"from the ArcGIS Maps SDK for JavaScript exposed through GeoBlazor's BasemapToggleWidget Razor component. " +
"The page shows a 2D map of Los Angeles, California. A small toggle button appears in the lower-right " +
"corner of the map showing a thumbnail of the alternate basemap; clicking it swaps the map's primary " +
"basemap with the alternate, then back again on the next click. Above the map is a dropdown for choosing " +
"the active pair of basemap styles: Satellite paired with Colored Pencil, Topographic paired with Dark Gray, " +
"Navigation paired with Imagery, or OpenStreetMap Standard paired with Terrain. Selecting a different " +
"pair causes the map to remount with the new primary basemap and configures the toggle to swap to the " +
"matching secondary style. The sample is intended to demonstrate one-click basemap switching and " +
"configurable basemap pairs in a Blazor application without writing JavaScript.";

private int _pairIndex;

private readonly (BasemapStyleName Primary, BasemapStyleName Secondary)[] _pairs =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,20 @@
new("https://developers.arcgis.com/javascript/latest/display-a-custom-basemap-style/", "ArcGIS Maps SDK for JavaScript"),
];

public override string Description =>
"This GeoBlazor sample, written in Blazor for .NET developers, demonstrates the various ways to " +
"configure a Basemap on a MapView or SceneView using GeoBlazor's Basemap, BasemapStyle, PortalItem, " +
"VectorTileLayer, and TileLayer Razor components, all built on top of the ArcGIS Maps SDK for JavaScript. " +
"Above the map is a vertical group of radio rows: Default Basemap (OpenStreetMap, no API key required), " +
"2D Map Styles (a dropdown of every BasemapStyleName enum value applied to a MapView), 3D Scene Styles " +
"(the same enum applied to a SceneView), From Portal Id (a curated dropdown of ArcGIS Online basemap " +
"items such as Streets, Satellite, Hybrid, Topographic, Gray, Dark Gray, and Streets Night), and From " +
"Tile Layers (a custom basemap stitched together from a World Hillshade tile layer with a Forest and " +
"Parks vector tile layer overlaid at 75% opacity). Each row exposes its dropdown only when selected, " +
"and changing the selection refreshes the underlying MapView or SceneView with the new basemap. The " +
"sample is intended to demonstrate how to source basemaps from multiple ArcGIS providers in a Blazor " +
"application without writing JavaScript.";

private void SetBasemap(int val)
{
_basemapType = val;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,19 @@
new("https://www.arcgis.com/home/item.html?id=bfefe7a603c94fc29edca0f4a6662b44", "City of Bend 3D Scene")
];

public override string Description =>
"This GeoBlazor sample, written in Blazor for .NET developers, demonstrates the BasemapLayerList " +
"widget from the ArcGIS Maps SDK for JavaScript exposed through GeoBlazor's BasemapLayerListWidget " +
"Razor component. The page shows a 3D scene of the City of Bend, Oregon loaded from a published " +
"WebScene PortalItem. Above the scene are two checkboxes labeled Toggle Reference Layers Visibility " +
"in Widget and Toggle Base Layers Visibility in Widget; both default to checked. The BasemapLayerList " +
"widget itself is anchored to the upper-right corner of the scene on desktop, or moved to a separate " +
"container above the scene on mobile so the map remains fully visible. The widget shows the basemap's " +
"base layers and reference layers grouped separately; expanding a group reveals each sublayer with " +
"its own visibility eye icon. Toggling either checkbox calls SetVisibleElements on the widget to hide " +
"or show the corresponding section of the list. The sample is intended to demonstrate granular control " +
"over basemap layer presentation in a Blazor application without writing JavaScript.";

protected override async Task OnAfterRenderAsync(bool firstRender)
{
int? oldWidth = _windowWidth;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,20 @@
new("https://developers.arcgis.com/javascript/latest/sample-code/widgets-bookmarks/", "Bookmarks Sample")
];

public override string Description =>
"This GeoBlazor sample, written in Blazor for .NET developers, demonstrates the Bookmarks widget " +
"from the ArcGIS Maps SDK for JavaScript exposed through GeoBlazor's BookmarksWidget Razor component. " +
"The page shows a 2D web map of Atlantic hurricane tracks loaded from an ArcGIS Online WebMap " +
"PortalItem. In the upper-right corner of the map an ExpandWidget is opened by default to reveal a " +
"list of named hurricane bookmarks; each bookmark has a small thumbnail and can be reordered by drag, " +
"edited via a pencil button, or extended with the Add Bookmark button. Clicking a bookmark zooms the " +
"view to the saved extent and applies a FeatureEffect to the underlying FeatureLayerView, graying out " +
"all hurricanes whose Name does not match. Below the map a heading reads Bookmarks followed by a " +
"bulleted list that mirrors the widget's Bookmarks collection; the list is wired to the reactive " +
"bookmarks.after-add event so newly added bookmarks appear immediately. The sample is intended to " +
"demonstrate reactive collection binding and feature effect filtering in a Blazor application without " +
"writing JavaScript.";

private void OnLayerViewCreate(LayerViewCreateEvent evt)
{
if (evt.Layer is not FeatureLayer) return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,19 @@
new("https://www.arcgis.com/home/item.html?id=3113eacc129942b4abde490a51aeb33f", "Stereographic Basemap")
];

public override string Description =>
"This GeoBlazor sample, written in Blazor for .NET developers, demonstrates the CSVLayer from the " +
"ArcGIS Maps SDK for JavaScript exposed through GeoBlazor's CSVLayer Razor component. The page shows " +
"a 2D world map drawn with a Stereographic projection basemap loaded from an ArcGIS Online portal item. " +
"On top of the basemap a CSV feed of NOAA hurricane track points is rendered through a UniqueValueRenderer " +
"keyed on the Category field, with each storm category (1 through 5) drawn as a distinct PictureMarkerSymbol " +
"firefly icon. Each point exposes a PopupTemplate showing the storm name, ISO time, pressure, and wind speed. " +
"Above the map is a labeled text input plus an Add new CSV Layer! button that, once the view is rendered, " +
"constructs an additional CSVLayer from any URL the user enters and adds it to the map at runtime. An " +
"ExpandWidget in the upper-left corner houses a LegendWidget that documents the hurricane category symbols. " +
"The sample is intended to demonstrate declarative and dynamic CSV data sources in a Blazor application " +
"without writing JavaScript.";

private void OnViewRendered()
{
_viewRendered = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,20 @@
new("https://www.arcgis.com/home/item.html?id=d582a9e953c44c09bb998c7d9b66f8d4", "Charted Territory BaseMap")
];

public override string Description =>
"This GeoBlazor sample, written in Blazor for .NET developers, demonstrates client-side geometry " +
"operations powered by the ArcGIS Maps SDK for JavaScript GeometryEngine, exposed through GeoBlazor's " +
"injectable GeometryEngine service. The page shows a 2D Charted Territory basemap zoomed in over the " +
"Santa Monica Mountains in southern California, with a purple Point, a purple Polyline, and a " +
"translucent purple Polygon already drawn as Graphics on a GraphicsLayer. A small CustomOverlay panel " +
"in the upper-right corner of the map contains four buttons: Buffer (calls GeometryEngine.GeodesicBuffer " +
"to draw a 1-kilometer buffer ring around the point), Intersect (calls GeometryEngine.Intersect to " +
"compute and draw the overlap between the polygon and the buffer using a hatched white fill), Union " +
"(calls GeometryEngine.Union to draw the merged polygon), and Reset (clears the buffer and any result " +
"graphic). Results are drawn into a separate GraphicsLayer so they can be cleared independently. The " +
"sample is intended to demonstrate calling spatial-analysis operations directly from C# in a Blazor " +
"application without writing JavaScript.";

private async Task CreateBuffer()
{
if (_bufferPolygon is not null) return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,19 @@
new("https://www.arcgis.com/home/item.html?id=1e126e7520f9466c9ca28b8f28b5e500", "World Ocean Basemap"),
];

public override string Description =>
"This GeoBlazor sample, written in Blazor for .NET developers, demonstrates capturing map click events, " +
"drawing dynamic Graphics, and triggering custom popup actions using the OnClick event of GeoBlazor's " +
"MapView Razor component, which wraps the ArcGIS Maps SDK for JavaScript MapView and Graphic APIs. The " +
"page shows a low-zoom 2D world map drawn with the World Ocean basemap (a TileLayer loaded from an " +
"ArcGIS Online portal item). Clicking anywhere on the map runs a HitTest to detect existing graphics; " +
"if no graphic was hit, a yellow SimpleMarkerSymbol with a blue outline is added to a GraphicsLayer at " +
"the clicked location. The graphic carries a PopupTemplate that displays the longitude and latitude " +
"and exposes a custom ActionButton (Click to Add to List, decorated with the dymaptic logo); clicking " +
"the action appends the point's coordinates to a Points Clicked list rendered below the map. The sample " +
"is intended to demonstrate event-driven graphic creation and popup actions in a Blazor application " +
"without writing JavaScript.";

private async Task OnClick(ClickEvent arg)
{
Point point = arg.MapPoint;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,19 @@
new("https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Compass.html", "Compass API Reference")
];

public override string Description =>
"This GeoBlazor sample, written in Blazor for .NET developers, demonstrates the Compass widget " +
"from the ArcGIS Maps SDK for JavaScript exposed through GeoBlazor's CompassWidget Razor component. " +
"The page shows an interactive 2D topographic map of the Santa Monica Mountains in southern California. " +
"Above the map is a row of buttons that rotate the view to preset bearings (45°, 90°, 180°, 270°) " +
"plus a Reset North button that returns the map to true north. A live readout displays the current " +
"rotation angle in degrees. The Compass widget itself appears in the upper-left corner of the map " +
"whenever the view is rotated away from north and disappears when aligned with north; clicking the " +
"compass icon snaps the view back to north. Map rotation is handled imperatively through " +
"MapView.SetRotation, and on-map gestures (such as right-click drag rotation or clicking the compass) " +
"synchronize the readout via the OnExtentChanged event. The sample is intended to demonstrate how to " +
"wire reactive map orientation controls in a Blazor application without writing JavaScript.";

private MapView? _mapView;
private double _rotation;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,23 @@
new("https://developers.arcgis.com/javascript/latest/display-projected-geometries/", "ArcGIS Maps SDK for JavaScript"),
];

public override string Description =>
"This GeoBlazor sample, written in Blazor for .NET developers, demonstrates how the same geometry " +
"looks under different map projections, using GeoBlazor's MapView and SpatialReference Razor components " +
"together with the ArcGIS Maps SDK for JavaScript GeoJSONLayer and a custom JavaScript hook into the " +
"GeometryEngine. The page shows a 2D world map of country polygons (from an Esri-hosted GeoJSON service) " +
"drawn over a light-blue background with a dashed rectangular extent outline. In the upper-right corner " +
"of the map a CustomOverlay holds a grouped projection dropdown organized by category (Equidistant, " +
"Conformal, Equal-area, Gnomonic, Compromise) listing options such as WGS84, World Cassini, World " +
"Equidistant Conic, World Stereographic, World Eckert VI, World Sinusoidal, North Pole Gnomonic, Web " +
"Mercator, World Gall Stereographic, World Winkel Tripel, and the Fuller / Dymaxion polyhedral map. " +
"Selecting a projection calls MapView.SetSpatialReference and the entire view reprojects on the fly. " +
"Hovering over the map invokes a custom JS extension that draws a 1000-kilometer geodesic buffer at the " +
"pointer so the user can see how distance and area distort across the chosen projection, and a popup in " +
"the lower-left corner shows the WKID and X/Y of the view center. The sample is intended to demonstrate " +
"live spatial-reference switching and JS interop in a Blazor application without writing JavaScript " +
"for the main page logic.";

private Symbol? PolySym { get; set; }
private Symbol? PointSym { get; set; }
private MapView? View { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,22 @@
new("https://www.arcgis.com/home/item.html?id=716b600dbbac433faa4bec9220c76b3a", "Imagery with Labels BaseMap")
];

public override string Description =>
"This GeoBlazor sample, written in Blazor for .NET developers, demonstrates how to build and edit " +
"Point, Polyline, and Polygon geometries through GeoBlazor's Graphic, Point, Polyline, Polygon, and " +
"GraphicsLayer Razor components, all built on the ArcGIS Maps SDK for JavaScript Graphic API. Above the " +
"map are three collapsible Accordion sections (Draw a Point, Draw a Polyline, Draw a Polygon). The Point " +
"section has paired longitude and latitude number inputs and a Draw / Remove button that adds or removes " +
"a purple SimpleMarkerSymbol on the GraphicsLayer; editing either coordinate calls SetGeometry to move " +
"the point live. The Polyline section displays a table of vertex rows (longitude, latitude) plus Add Pt " +
"and Remove Pt buttons that grow or shrink the polyline; the Draw button toggles a white polyline graphic. " +
"The Polygon section works the same way for a translucent purple polygon and attaches a PopupTemplate so " +
"clicking the polygon shows a Congratulations message. Below the map (a 2D Imagery with Labels basemap " +
"centered over the Santa Monica Mountains) sits a row of Get Point Data, Get Polyline Data, and Get Polygon " +
"Data buttons that serialize the current Graphic geometry to JSON and render it underneath. The sample is " +
"intended to demonstrate two-way binding between C# state and live map geometry in a Blazor application " +
"without writing JavaScript.";

private async Task DrawPoint()
{
_showPoint = !_showPoint;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,21 @@
new("https://www.arcgis.com/home/item.html?id=3d355e34cbd3405dbb3f031286f7b39b", "Daily Planet Imagery Web Map")
];

public override string Description =>
"This GeoBlazor sample, written in Blazor for .NET developers, demonstrates the full set of MapView " +
"events from the ArcGIS Maps SDK for JavaScript surfaced as Razor event callbacks on GeoBlazor's MapView " +
"component. The page shows a 2D Daily Planet imagery WebMap loaded from an ArcGIS Online portal item. " +
"Above the map are three collapsible Accordion sections grouping the live event feeds: Click/Drag/Focus " +
"Events (Click, Double Click, Hold, Drag, Blur, Focus), Pointer Events (Pointer Down, Pointer Up, Pointer " +
"Enter, Pointer Leave, Pointer Move), and Key/Mouse Events (Key Down, Key Up, Mouse Wheel, Extent). Each " +
"field in those sections shows a live JSON dump of the most recent corresponding event payload. " +
"Interactions on the map (clicks, drags, key presses, scroll-wheel zooms, etc.) flow through OnClick, " +
"OnDoubleClick, OnHold, OnDrag, OnPointerDown, OnPointerUp, OnPointerEnter, OnPointerLeave, OnPointerMove, " +
"OnKeyDown, OnKeyUp, OnMouseWheel, OnExtentChanged, OnBlur, and OnFocus callbacks; OnClick additionally " +
"calls ToScreen and ToMap to round-trip the click point. Events are throttled with EventRateLimitInMilliseconds. " +
"The sample is intended to demonstrate listening to and inspecting every map event in a Blazor application " +
"without writing JavaScript.";

private async Task OnMapClick(ClickEvent clickEvent)
{
_clickJson = BuildViewableJson(clickEvent);
Expand Down
Loading
Loading