Show on map Layers Widget

495
5
06-06-2025 05:02 AM

Show on map Layers Widget

Overview

The Show on map Layers Widget is a custom widget for ArcGIS Experience Builder that provides comprehensive management and styling capabilities for layers created by the "Show on map" data action.

Out of the box, Experience Builder provides very limited functionality for "Show on map" layers. The only native option is to simply remove them from the map. There's no built-in way to style, rename, organize, or manage these layers once they're created.

This widget fills that gap by giving you full control over layer appearance and organization.  Additionally, supports export/import layers to preserve selections between sessions.

Thanks to @JeffreyThompson2  for the idea!

https://community.esri.com/t5/experience-builder-tips-and-tricks/clearing-the-show-on-map-highlighti...

Let’s throw that trashcan in the trash!  CSS override now hides the trashcan on opening the widget.

Marshal_0-1749148437203.png

 

Tested in ArcGIS Experience Builder Developer Edition 1.15, 1.17, and 1.18.
Compatible across all three versions without modification.

Key Features

Symbology Control

  • Color and symbol customization
  • Size and transparency customization
  • Preview symbol changes in symbol selector before applying
  • Symbol extraction from imported layers preserves styling

Layer Management

  • Centralized layer list showing all "Show on map" layers
  • Visual visibility toggles with on/off indicators
  • Zoom to layer extent for quick navigation
  • Layer ordering - bring to front or send to back
    • Bring to front makes it the absolute top layer
    • Send to back is relative only to other “Show on map” layers
  • Rename layers with meaningful runtime names and export file names
  • Remove layers from the map

Import & Export

Dynamic Operation

  • Automatically discovers new "Show on map" layers and imported layers
  • Smart filtering to show only “Show on map” layers
  • Widget UI updates to reflect symbology of currently selected layer
  • Zooms to newly imported layers
  • Switching layers zooms to newly selected layer

Widget Configuration

Map Connection

  • Map Widget: Select which map widget to connect to (required)

Export Options

  • Include Attributes: Export feature attributes along with geometry and symbology
  • Draw-Advanced Compatible JSON: Export format for importing into Draw-Advanced widget (not compatible with Include Attributes)

Workflow Integration

Seamless Enhancement

  1. Use "Show on map" from any widget, table, or other method as usual
  2. Open the Show on map Layers Widget to see your layer automatically detected
  3. Manage layer name, style, etc.
  4. Export and organize results for future use
  5. Import into Draw-Advanced widget to add annotations or markups

Cross-Widget Compatibility

  • JSON exports compatible with Draw-Advanced widget (when configured)
  • Multiple features aggregated into single multipart geometry to avoid flooding "My Drawings"

Before vs. After

Default Experience Builder:

  • Generic names: "select widget selection", "select widget selection 2", etc.
  • Identical symbology regardless of content
  • Only option is complete layer removal
  • No organization, renaming, or styling capabilities
  • Cluttered map with indistinguishable results

With Show on map Layers Widget:

  • Meaningful names: "Wells in Target Area", "High Priority Parcels"
  • Customizable styling
  • Layer management - visibility, ordering, renaming, removal
  • Reusable layers through import/export functionality

Hope this helps others working with "Show on map" layers in their Experience Builder apps!

 

Attachments
Comments
JeffreyThompson2
MVP Frequent Contributor

I like it. It goes a long way to fixing this crime against UI while adding a lot of useful features. I did add one bit of CSS.

.exbmap-ui-tool-shell-ClearActionData {
    display: none;
}

This should hide the trashcan when your Widget loads.

People have asked for a symbology switcher widget. I think this could be that widget as well.

Marshal
Frequent Contributor

Thanks for the feedback and the great idea, @JeffreyThompson2

I updated the widget to inject this CSS when opening the widget for the first time.

JeffreyThompson2
MVP Frequent Contributor

Hey @Marshal, I am in the process of upgrading to 1.18 and I can't get webpack to recognize your widget. Your folder structure is a bit different with an extra folder between the root and the src folder. So I tried re-arranging. I also noticed you did not list jimu-arcgis as a dependency in manifest.json, so I tried add that as well. Neither fix worked and the widget worked fine without these changes in 1.17.

There was some user error on my part. I downloaded a fresh copy of the widget and tried again, but webpack still isn't seeing your widget. Have you upgraded yet? Do you have any suggestions?

Marshal
Frequent Contributor

Dang, I feel like I just got done upgrading all my widgets and apps to 1.17.

I'll try to figure it out this week.  Thanks for the heads up!

@JeffreyThompson2 

Update:

I submitted the updated widget zip file and updated the article to reflect all ExB Dev versions this widget has been tested in. The issue was caused by an invalid manifest.json.

If you previously ran npm start while the manifest was invalid, the widget may have been skipped and never registered in the build process.  Simply fixing the manifest didn't cause it to be picked up automatically in my case.

To force Experience Builder to re-scan and include the widget, run this from the client folder:

npm run build:dev

Once the widget is registered, npm start will detect changes and rebuild normally.

Please let me know of any issues!  Thanks!

JeffreyThompson2
MVP Frequent Contributor

@Marshal I downloaded a new copy and ran npm run build:dev and the widget is registered again. I have not seen an issue like that before. I'd like to know more about what the problem was and how to fix it, maybe as an article for the Tips and Tricks Board.

Version history
Last update:
2 weeks ago
Updated by:
Contributors