GraphicsLayer graphicsLayer = this._map.Layers["CallsLayer"] as GraphicsLayer; if (graphicsLayer != null) { graphicsLayer.Graphics.Clear(); ESRI.ArcGIS.Client.Geometry.MapPoint point = new ESRI.ArcGIS.Client.Geometry.MapPoint(longitude, latitude); point.SpatialReference = new ESRI.ArcGIS.Client.Geometry.SpatialReference(4326); ESRI.ArcGIS.Client.Symbols.PictureMarkerSymbol ms = new ESRI.ArcGIS.Client.Symbols.PictureMarkerSymbol(); Graphic g = new Graphic(); g.Geometry = this.ConvertToMapCoordinates(point); ms.Source = imageSource; g.Attributes.Add("Name", name); g.Symbol = ms; g.Attributes.Add("Object", itemObject); graphicsLayer.Graphics.Add(g); }
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.