Select to view content in your preferred language

Set Visibility Range or Reference scale for Map with layers

2642
9
Jump to solution
03-22-2022 12:51 PM
KevinCheriyan
Frequent Contributor

I have a webmap with lots of layers, that I want to set the visibility range for. I don't want to deal with this in Pro, since publishing it back to Online takes a long time. I can't go through every layer's settings and change the range individually. 

Is there a way to change the map's reference scale in ArcGIS Online or achieve what I want using the ArcGIS API for Python? 


--------------------------------------------------
Application Developer, GeoMarvel
0 Kudos
1 Solution

Accepted Solutions
RussRoberts
Esri Notable Contributor

You could set the layers in a group layer in Map Viewer and use the group layer to define the visible scale range. Note this would then be for 4.x JSAPI apps that support group layers and runtime apps that also support group layers.

 

RussellRoberts1_0-1647980453510.png

 

View solution in original post

9 Replies
RussRoberts
Esri Notable Contributor

You could set the layers in a group layer in Map Viewer and use the group layer to define the visible scale range. Note this would then be for 4.x JSAPI apps that support group layers and runtime apps that also support group layers.

 

RussellRoberts1_0-1647980453510.png

 

KevinCheriyan
Frequent Contributor

Definitely a solution if my layers were contained within GroupLayers. But alas, adding Feature Services that have group layers in them to a webmap doesn't preserve this nesting structure. So I am left with a webmap with hundreds of broken down child layers, and no group layers. 

I'm actually checking Python API to see if there's a method that allows me to programatically group together layers...


--------------------------------------------------
Application Developer, GeoMarvel
0 Kudos
RussRoberts
Esri Notable Contributor

We are actually making a change to this tonight in the Online update where items with multiple layers will get grouped automatically. 

KevinCheriyan
Frequent Contributor

Music to my ears! I've been dealing with this issue and trying to circumvent it by dealing with Python API and republishing from Pro. 

Looking forward to the release!


--------------------------------------------------
Application Developer, GeoMarvel
RussRoberts
Esri Notable Contributor

This is out now. WHen you add the item to a map it will show the item title as the group layer name and then all the layers in the item listed below.

RussellRoberts1_0-1648041019021.png

 

KevinCheriyan
Frequent Contributor

I see it and setting visibility ranges work! I'll accept your original post as solution. Any word on when nested layers will be implemented? If I have a feature layer with nested group layers, and I add them to the webmap, they still appear as one group layer. 


--------------------------------------------------
Application Developer, GeoMarvel
0 Kudos
RussRoberts
Esri Notable Contributor

So the feature layer wont contain any nesting or in the item yet when published from Pro but we did add nesting in Map Viewer this release.  When a layer is in a group you can click Add to New group whci will create a new nested group or you can use the overflow actions on a group to Move to Group which will nest that group inside another group or drag and drop.

 

RussellRoberts1_0-1648051144893.png

 

KevinCheriyan
Frequent Contributor

Great! Sounds like this update has a lot of long awaited features. I'll wait for the blog post with all the release notes. 🙂


--------------------------------------------------
Application Developer, GeoMarvel
0 Kudos