rivate Sub MyDrawObject_DrawComplete(ByVal sender As Object, ByVal args As ESRI.ArcGIS.Client.DrawEventArgs) Dim graphicsLayer As GraphicsLayer = TryCast(MyMap.Layers("MyGraphicsLayer"), GraphicsLayer) Dim graphic As New ESRI.ArcGIS.Client.Graphic() With { .Geometry = args.Geometry, .Symbol = _activeSymbol } graphicsLayer.Graphics.Add(graphic) End Sub
Solved! Go to Solution.
Private Sub MyDrawObject_DrawComplete(ByVal sender As Object, ByVal args As ESRI.ArcGIS.Client.DrawEventArgs) Dim graphicsLayer As GraphicsLayer = TryCast(MyMap.Layers("MyGraphicsLayer"), GraphicsLayer) Dim graphic As New ESRI.ArcGIS.Client.Graphic() With { .Geometry = args.Geometry, .Symbol = _activeSymbol } graphicsLayer.Graphics.Add(graphic) Dim mapPoint As MapPoint = TryCast(args.Geometry, MapPoint) If mapPoint Is Not Nothing Then ''Write out the points, make sure to convert to WGS 84 if in Web Mercator End If End Sub
Private Sub MyDrawObject_DrawComplete(ByVal sender As Object, ByVal args As ESRI.ArcGIS.Client.DrawEventArgs) Dim graphicsLayer As GraphicsLayer = TryCast(MyMap.Layers("MyGraphicsLayer"), GraphicsLayer) Dim graphic As New ESRI.ArcGIS.Client.Graphic() With { .Geometry = args.Geometry, .Symbol = _activeSymbol } graphicsLayer.Graphics.Add(graphic) Dim mapPoint As MapPoint = TryCast(args.Geometry, MapPoint) If mapPoint Is Not Nothing Then ''Write out the points, make sure to convert to WGS 84 if in Web Mercator End If End Sub