ArcGIS API for Silverlight 中根據座標點在地圖上打標記

暖楓無敵發表於2012-03-14
public void AddMarkerGraphics()
{
      ESRI.ArcGIS.Client.Projection.WebMercator mercator = new ESRI.ArcGIS.Client.Projection.WebMercator();
      GraphicsLayer graphicsLayer = myMap.Layers["MyGraphicsLayer"] as GraphicsLayer;
      Graphic graphic = new Graphic()
      {
           Geometry = mercator.FromGeographic(new MapPoint(115.257113, 33.0696150000001)),
           Symbol = LayoutRoot.Resources["DefaultMarkerSymbol"] as Symbol
      };
     graphicsLayer.Graphics.Add(graphic);
 }

這個主要是FromGeographic()方法,傳入的是一個4326的座標系。


相關文章