Skip to content

Instantly share code, notes, and snippets.

View willi's full-sized avatar
👋
.

Willi Wu willi

👋
.
  • San Francisco + Copenhagen
View GitHub Profile

Keybase proof

I hereby claim:

  • I am willi on github.
  • I am williw (https://keybase.io/williw) on keybase.
  • I have a public key ASDBy5PYHOgmdfktohYExjco0ekPqmD-8qKtXLyVSwNcgAo

To claim this, I am signing this object:

@willi
willi / gist:3654316
Created September 6, 2012 10:09
ArcGIS covert coordinate latitude and longitude to AGSPoint
- (AGSPoint *)agsPointFromLatitude:(double)latitude longitude:(double)longitude
{
AGSSpatialReference *referenceGPS = [AGSSpatialReference wgs84SpatialReference];
AGSGeometryEngine *ge = [AGSGeometryEngine defaultGeometryEngine];
AGSPoint *graphicPoint = [AGSPoint pointWithX:longitude y:latitude spatialReference:referenceGPS];
AGSGeometry *myPointReprojected = [ge projectGeometry:graphicPoint toSpatialReference:_mapView.spatialReference]; //[AGSSpatialReference webMercatorSpatialReference]
return (AGSPoint *)myPointReprojected;
}