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); }
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.