AnsweredAssumed Answered

Graphic Point Does Not Display

Question asked by greggcountryman@ups.com on Dec 15, 2015
Latest reply on Dec 16, 2015 by akajanus-esristaff

Hello,

 

I have a simple map containing a Tiled Layer, and a cashed layer. When I add a Graphic Point, it will only display if I do not load the Tiled Service.

 

Here is the code:

 

                var streetsCacheLayer = new ArcGISTiledMapServiceLayer(new Uri(streetsCacheUrl));

                streetsCacheLayer.MaxScale = 36111;

                var streetsDynamicLayer = new ArcGISDynamicMapServiceLayer(new Uri(streetsDynamicUrl));

 

 

                var graphicsLayer = new Esri.ArcGISRuntime.Layers.GraphicsLayer();

                graphicsLayer.ID = "MyGraphics";

                var mapPoint = new MapPoint(-76.644759, 39.516597);

                var depotSym = new SimpleMarkerSymbol { Style = SimpleMarkerStyle.Circle, Size = 16, Color = Colors.Green };

                var depotMapGraphic = new Graphic { Geometry = mapPoint, Symbol = depotSym };

                graphicsLayer.Graphics.Add(depotMapGraphic);

 

                 await streetsCacheLayer.InitializeAsync();

                await streetsDynamicLayer.InitializeAsync();

                await graphicsLayer.InitializeAsync();

 

                // If I comment out the next line the graphic shows up, otherwise it does not.

                MyMap.Layers.Add(streetsCacheLayer);

                MyMap.Layers.Add(streetsDynamicLayer);

                MyMap.Layers.Add(graphicsLayer);

 

 

Any ideas?

 

Thanks,

 

Ed

Outcomes