Popup with Edit Action
The sample makes use of both Popups and the Editor widget. It does this by demonstrating how to add a custom edit action to a PopupTemplate displayed in a Popup. The popup displays a custom Edit feature action. It works by starting an Editor workflow for editing attribute data. Edits can then be made and updated. Once this happens, the popup's content is updated to display these feature edits. One thing to note is that the Editor works with feature layers that are editable. In this case, we have a service that is set to allow only attribute editing.
This sample currently uses code from our GeoBlazor Pro extensions library.
For more information about licensing these advanced features, contact info@dymaptic.com.
About this sample
This GeoBlazor Pro sample, written in Blazor for .NET developers, demonstrates a custom popup edit action from the ArcGIS Maps SDK for JavaScript exposed through GeoBlazor Pro's PopupWidget, EditorWidget, PopupTemplate, and ActionButton Razor components. The page shows a 2D topographic basemap centered on El Paso, Texas, displaying a recreation-trails FeatureLayer. An ExpandWidget in the upper-left corner carries a help panel explaining the workflow. Clicking a trail opens a popup whose content is generated by a content function that color-codes the difficulty level (green for easy, purple for medium, red for hard) and shows attachments; the popup also exposes a custom Edit feature ActionButton with a pencil icon. Clicking that action closes the popup, opens the EditorWidget docked in the upper-right corner, and starts an attribute-editing workflow scoped to the clicked feature. When the editor is dismissed, the popup re-opens with refreshed values. The sample is intended to demonstrate orchestrating popups and the editor through a single in-popup action.