Supporting groups in base layer

340
1
03-04-2020 04:14 AM
YaronAvraham
New Contributor III

I'm trying to implement a feature where the user can group base layers, operational layers and GraphicsOverlays into something like a group layer.

but from what i can see only the operational layers collection supports using group layer and base layers collection does not support it, and as far as i see there is no option at all to group several GraphicsOverlays together.

is there any thing that i'm missing that can help me implement this feature?

0 Kudos
1 Reply
dotMorten_esri
Esri Notable Contributor

First wrt GraphicsOverlays, as these are not layers, they won't be able to go into the map itself. They're always-on-top and maintained separately from the map. They're typically meant for session-like data, like search results, routes, red lines etc, and can transcend multiple maps (ie you can retain search results, but go pick a completely different map, and your search results are still there). It's also nice to know that your view model always have a set of graphics layers available to place these things in, regardless of which map is currently open.


Basemap is sort of two group layers in itself: It contains the baselayers, and references layers. Baselayers goes on the bottom, and reference layers (typically pre-generated labels) goes on top of the operational layers. The idea is that if you want to change the basemap, you just set the basemap property, and your operational layers stay intact. ie

     myMap.Basemap = Basemap.CreateImagery();

It makes it very easy to build a basemap-switching experience.

GroupLayers in itself doesn't really do anything, other than help you manage a set of layers together, and turn them on/off together. They are mostly for organizing data in your operational layers and mostly useful if you have a Table-of-contents like control.

I'm curious what you need group layers for outside of operational layers. Perhaps you could expand a little on that?

0 Kudos