I'm trying to plot some AGSSimpleMarkerSymbol's
in a AGSGraphicsLayer
. The issue I'm running into is that the data I'm starting with are GPS coordinates (lat/lon). I'm using AGSPoint
to plot the data, however, AGSPoint
wants x and y points – not lat/lon.
My question is, how do I convert my GPS coordinates to x and y points?
Best Answer
Basically you want to use the
projectGeometry
method from the AGSGeometryEngine class to convert from the GPS coordinate system to the coordinate system used by your map. Use thedefaultGeometryEngine
for this.Assuming your GPS is giving you WGS-84 coordinates you could do something like this: