kuiperfoliage

Map Extent and GraphicLayers

Discussion created by kuiperfoliage on Nov 6, 2013
Latest reply on Nov 8, 2013 by kuiperfoliage
I'm struggling with something that should be basic i guess. I'm trying to add GraphicLayers to my map. GraphicLayers don't have a SpatialReference, so i'm trying to set the Map SpatialReference based on the Geometry items within the GraphicsLayers.

I'm starting with an empty Map without any Extent specified.

If I set the Map.Extent, after the Map Loaded event is called, to the same WKID (102100), my Layer IS NOT shown when added.
If i set the Map.Extent, before the Map Loaded event is called, my Layer IS shown when added.

How can I set the extent after the Map Loaded event is called and make sure my GraphicLayer is shown ?

The Layer is also shown if I first add a Layer that supports SpatialReference (such as a Tiled Layer).

It feels/seems that just setting the Map.Extent is not fully initializing the SpatialReference of the map.

Thanks

Outcomes