Change Operational Layer when Basemap is changed

741
3
Jump to solution
03-09-2013 05:05 PM
NeoGeo
by
Occasional Contributor III
Is there a way to set up groups of basemaps and operational layers so that when one a particular basemap is chosen, the corresponding operational layers could be enabled and the others disabled.  I am sure some of you have to have run across the problem where an operational layer you create to overlay over (dark) aerial photography is practically invisible once placed over a light colored basemap like Bing streets etc and vice versa.  Note that we already use double lines with contrasting colors and halos but it still does not work well.  Our production server is still the 2.x Flex Viewer and our 3.0 viewer is in progress so I have not seen the 3.1 capabilities yet but the search came up with nothing.

Thanks!!
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
NeoGeo
by
Occasional Contributor III
I originally posted this a year ago and long since found the answer, but am only just now getting back to this thread.

The answer is that you just make groups of layers with the same name in config.xml and all of the layers in the group get turned on or off as a single layer.  You can create a different dark colored operational layer to display with light basemaps and a light colored one for dark basemaps and when you switch basemaps it switches overlays also.

View solution in original post

0 Kudos
3 Replies
ShaunWeston
Occasional Contributor
I've done something similar where I made some changes to the Flex Viewer to turn a couple of layers on (Roads and address points) when a particular base map is turned (imagery) and then turn those layers off when another basemap is selected. I had to make some changes to the code in a table of contents widget to get this to occur. Are you a developer? I can let you know in more detail what I did if you are interested.
0 Kudos
AnthonyGiles
Frequent Contributor
I have posted up a widget that allows the user to alter the appearance of the base map for tiled map services in the browser. This may be someting you could look at using:

http://www.arcgis.com/home/item.html?id=3d1ea673ad15413db81262a4e73184ac

If you have the ability to alter the code you can adding more effects is fairly straight forward

Regards

Anthony
0 Kudos
NeoGeo
by
Occasional Contributor III
I originally posted this a year ago and long since found the answer, but am only just now getting back to this thread.

The answer is that you just make groups of layers with the same name in config.xml and all of the layers in the group get turned on or off as a single layer.  You can create a different dark colored operational layer to display with light basemaps and a light colored one for dark basemaps and when you switch basemaps it switches overlays also.
0 Kudos