MESEDN3

Add AGO webmap operationalLayer JSON to an already created map object

Discussion created by MESEDN3 on Aug 1, 2013
Latest reply on Oct 31, 2013 by susanhmel
Hoping someone can help.  I have a map where I use utils to createMap from a webmap JSON file.  Later, I want to add other layers that come from a config file that has all the properties of an operationalLayer.  Is there a way to add an operationalLayer to a map?

Currently, I'm creating a second map, grabbing the layers and then map.addLayer()-ing them into my current map.  While this works in some cases, larger more complex layers it hang/errors.

What I want is to be able to easily configure popups/visibility/opacity through JSON, and then as the user wants, bring these into the map.

Ideas? I'm struggling!
Thanks

Outcomes