POST
|
This thread also shed a bit of light on things. http://forums.arcgis.com/threads/15226-Project-AgsPoint-(spatial-reference-4326-to-spatial-reference-102100)
... View more
04-19-2013
11:08 AM
|
0
|
0
|
314
|
POST
|
Just to be clear this was the ticket. AGSGeometry *currentSketchValue2 = (AGSEnvelope*)AGSGeometryWebMercatorToGeographic(self.sketchLayer.geometry);
... View more
04-19-2013
10:56 AM
|
0
|
0
|
314
|
POST
|
I figured out what was going on. It appears that my Feature Layer was set to WGS 4326 and the Sketch Layer defaults to Web Mercator. To resolve this I passed my Sketch Layers geometry information through the AGSGeometryWebMercatorToGeographic utility method and out came the correct geocode (i.e., latitude, longitude. If you'd like to try this out, I was using the following: - (void) didOpenWebMap:(AGSWebMap *)webMap intoMapView:(AGSMapView *)mapView { ... [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(respondToGeomChanged:) name:AGSSketchGraphicsLayerGeometryDidChangeNotification object:nil]; ... } - (void)respondToGeomChanged: (NSNotification*) notification { if([self.sketchLayer.geometry isValid] && ![self.sketchLayer.geometry isEmpty]) { AGSGeometry *currentSketchValue2 = (AGSEnvelope*)AGSGeometryWebMercatorToGeographic(self.sketchLayer.geometry); NSLog(@"AGSGeometryWebMercatorToGeographic: %@", currentSketchValue2); } } Cheers!
... View more
04-19-2013
10:54 AM
|
0
|
0
|
314
|
POST
|
Following up with a few details. The information that I'm receiving is a mutable point (i.e., AGSMutablePoint). When displayed in the debugger we get: AGSMutablePoint:
x = -13628019.829820,
y = 4549121.863850,
spatial reference: [
AGSSpatialReference: wkid = 102100,
wkt = null
] Questions: Why are those X and Y coordinates not a simple GeoCode (e.g., latitude, longitude)? More importantly can I just convert those numbers or does something else need to happen?
... View more
04-19-2013
10:15 AM
|
0
|
0
|
314
|
POST
|
Hello all: We are attempting to get a geocode (i.e., longitude, latitude) from the sketch layer. To date we have been successful in getting the X and Y from the point but they look like this: 89569.25265 45236.32566 This obviously is not even close to being a geocode (i.e., longitude, latitude), at least not in my normal line of thinking. Now we're using a notification to use respondToGeomChanged [see below]: [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(respondToGeomChanged:) name:AGSSketchGraphicsLayerGeometryDidChangeNotification object:nil]; That method, when called, fires, gets the geometry information from the sketchLayer that we've already instantiated. self.sketchLayer.geometry If we simply put that in a log, we can find out that it's a mutable point ... and from there we can build that out appropriately: AGSMutablePoint *currentSketchValue = self.sketchLayer.geometry; Now that we have an AGSMutablePoint the documentation from Esri for version 10.1 of the SDK we see we have access to an X (double) and a Y (double) ... but these are not longitude and latitude. These are the numbers that I showed above. How do we either A) get the longitude and latitude or B) convert the AGSMutablePoint X & Y to a longitude and latitude?
... View more
04-18-2013
12:04 PM
|
0
|
4
|
700
|
POST
|
Hello: #1 My understanding is that the Feature Service will need to be hosted online, either through ArcGIS Online or through ArcGIS Server. #2 I cannot explain the Location Tracking service. #3 To create a basic service that you can update, I believe you should able to do something as simple as "Add item" in "My Content". The item you're adding could be as simple as a CSV with defined headers. When uploading the CSV you'd need to make sure the "Create a Feature Service" box is checked in the upload form/popup. After that you'd just need to make the Feature Service "Editable" by visiting the Feature Service that was created, clicking "Edit" and then checking the desired edit option (e.g., add/edit/delete, update only, add only). #4 The email update would be a custom feature that would need to be developed, possible via a custom ArcGIS iOS application .. at least to the best of my knowledge. Hope that helps a little.
... View more
04-18-2013
08:08 AM
|
0
|
0
|
263
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|