Select to view content in your preferred language

Display multiple layers as a single layer in Web Map, like you can in Scene Viewer

417
5
Jump to solution
07-30-2024 02:56 AM
Labels (1)
MappyIan
Frequent Contributor

In Scene Viewer, for groups of layers, you have the option to present them to the user as a single item in the layer control.  Looking at the following ESRI example: https://developers.arcgis.com/javascript/latest/sample-code/widgets-layerlist/live/, the 'Transit lines in service' layer item is actually two separate layers: a point layer for stops and a line layer for routes.

MappyIan_1-1722332645772.png

But the user is presented with a single item in the layers panel so that the two layers are always viewed together:

MappyIan_0-1722332609074.png

In Scene Viewer, this is configured by selecting the Merge option from the menu accessed by clicking on the three dots next to the group item:

MappyIan_2-1722332717081.png

This works great in Scene Viewer, but I'm trying to replicate the exact same functionality in Map Viewer, but the 'merge' option isn't there (neither is the 'checkbox' or 'radio' or 'hide' options - all of which would be useful additions to Map Viewer).

At the moment, the best we can do is group the two individual layers and set the individual layers to be turned on by default and have the group layer turned off by default so end users just need to interact with the group layer.  Whilst this works users can still expand the group layer and turn the individual layers on/off independently.  We're displaying bus stops and routes, so the scenario is identical to the ESRI Scene Viewer example (but we're using a web map rather than a scene):

MappyIan_5-1722333071339.png

We just want end users to see a single item called 'Universal Bus', and not the two layers that make up this group.

Does anyone know of a workaround for this in Map Viewer?  Or does anyone from ESRI know if there are plans to implement the same controls in Map Viewer as there are in Scene Viewer as I can see all the functions currently in Scene Viewer but not in Map Viewer (checkbox, radio, merge, hide) being useful in Map Viewer.

1 Solution

Accepted Solutions
MappyIan
Frequent Contributor

Thanks @RussRoberts for responding.  I've logged this suggestion as an Idea in the hope that it may be included in the future if popular: https://community.esri.com/t5/arcgis-online-ideas/display-multiple-layers-as-a-single-layer-in-web/i...

All kudos for the idea would be greatly appreciated.

View solution in original post

0 Kudos
5 Replies
okenuli
New Contributor

What version of ArcGIS Portal are your company on? And what version of Pro are you using to publish the data with?

Also when adding the layer to the scene viewer, does any error occur? Are you one of the administrators of the Enterprise, if so can you check if there are any errors in the Portal/Server logs?

 

0 Kudos
MappyIan
Frequent Contributor

Hey @okenuli, thanks for replying but you've misunderstood my post.  I'm not having a problem with Scene Viewer, that works fine.  The issue is that I would like to see the functionality available in Scene Viewer also available in Map Viewer for 2D presentations.  Specifically the ability to merge groups of layers in to a single item in the layers panel when published.  Hope this clears it up.

For completeness, I'm using the latest version of Pro (currently 3.3.1), publishing directly to ArcGIS Online (we don't use Enterprise).

0 Kudos
RussRoberts
Esri Notable Contributor

Map Viewer can have the radio/explicit visibility group layers. You can set this under the layer properties panel for the group layer.

https://www.esri.com/arcgis-blog/products/arcgis-online/mapping/a-hug-for-group-layers-show-only-one...

 

At this time we do not have plans to add merge or hidden group layer types. 

Thomas1
Frequent Contributor

Hei @RussRoberts,

Thanks for answering Mappylan, but why merge and hidden group layer are in Scene Viewer but not in Map Viewer? This is so stupid and frustrating.  

MappyIan
Frequent Contributor

Thanks @RussRoberts for responding.  I've logged this suggestion as an Idea in the hope that it may be included in the future if popular: https://community.esri.com/t5/arcgis-online-ideas/display-multiple-layers-as-a-single-layer-in-web/i...

All kudos for the idea would be greatly appreciated.

0 Kudos