_defaultSpatialRef = [AGSSpatialReference spatialReferenceWithWKID:3163]; AGSGeometryEngine *engine = [AGSGeometryEngine defaultGeometryEngine]; AGSPoint *point = [AGSPoint pointWithX:currentLocation.coordinate.latitude y:currentLocation.coordinate.longitude spatialReference:[AGSSpatialReference spatialReferenceWithWKID:WKID_WGS84]]; AGSPoint *projectedPoint= (AGSPoint*)[engine projectGeometry:point toSpatialReference:_defaultSpatialRef];
- Which way should I map X/Y to lat/long (in all other examples I saw X->lat and Y->lng but it does not give any result)
- Am I doing it the right way or missing anything?
_defaultSpatialRef = [AGSSpatialReference spatialReferenceWithWKID:3163]; AGSGeometryEngine *engine = [AGSGeometryEngine defaultGeometryEngine]; AGSPoint *point = [AGSPoint pointWithX:currentLocation.coordinate.latitude y:currentLocation.coordinate.longitude spatialReference:[AGSSpatialReference spatialReferenceWithWKID:WKID_WGS84]]; AGSPoint *pointProjectedToWGS84 = (AGSPoint *)[engine projectGeometry:point toSpatialReference:[AGSSpatialReference spatialReferenceWithWKID:WKID_WGS84]]; AGSPoint *projectedPoint= (AGSPoint*)[engine projectGeometry:pointProjectedToWGS84 toSpatialReference:_defaultSpatialRef];
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.