POST
|
This is a silverlight api question. I can calculate distance between to points using a method like below. My problem is I don't know wheter there is a way to reverse it? private double FindDistance(double x1, double y1, double x2, double y2) { ESRI.ArcGIS.Client.Geometry.SpatialReference aSpatialReference = new ESRI.ArcGIS.Client.Geometry.SpatialReference(102100); MapPoint aMapPoint1 = new MapPoint(x1, y1); MapPoint aMapPoint2 = new MapPoint(x2, y2); p1 = aMapPoint1.GeographicToWebMercator(); p2 = aMapPoint2.GeographicToWebMercator(); ESRI.ArcGIS.Client.Geometry.PointCollection pColl = new ESRI.ArcGIS.Client.Geometry.PointCollection(); pColl.Add(p1); pColl.Add(p2); ObservableCollection<ESRI.ArcGIS.Client.Geometry.PointCollection> oColl = new ObservableCollection<ESRI.ArcGIS.Client.Geometry.PointCollection>(); oColl.Add(pColl); ESRI.ArcGIS.Client.Geometry.Polyline pLine = new ESRI.ArcGIS.Client.Geometry.Polyline(); pLine.Paths = oColl; pLine.SpatialReference = aSpatialReference; var graphic = new Graphic(); graphic.Geometry = (ESRI.ArcGIS.Client.Geometry.Geometry)pLine; var geog = new ESRI.ArcGIS.Client.Projection.WebMercator(); ESRI.ArcGIS.Client.Geometry.Polyline wgs = (ESRI.ArcGIS.Client.Geometry.Polyline)geog.ToGeographic(pLine); return ESRI.ArcGIS.Client.Geometry.Geodesic.Length(wgs); }
... View more
06-19-2015
03:10 AM
|
0
|
0
|
280
|
POST
|
sure, I asked x and y distance... sorry my bad English!
... View more
06-19-2015
02:04 AM
|
0
|
2
|
280
|
POST
|
how to find new point with a x,y distance from a given point?
... View more
06-19-2015
01:28 AM
|
0
|
4
|
3360
|
POST
|
I was using Tiled Layers. Using Layers.Insert(0,...) instead of Add(.. corrected the case.
... View more
03-23-2015
02:14 AM
|
0
|
0
|
185
|
POST
|
Regarding Web page: https://developers.arcgis.com/silverlight/guide/using-a-draw-surface.htm I applied all procedures, red polygon drawn OK, but blue one does not show up on map. API:3.3.
... View more
03-12-2015
01:46 AM
|
0
|
1
|
4502
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:25 AM
|