Hi,
I'm looking for ideas of how to track user's movement in background thread... While user is collecting point, line or polygon features and moving around in field, I also want to record his route and ultimately save it as a line feature to the local geodatabase. Note that the map's touch delegate has been already used by the sketch layer in the main thread. Is this possible?
Thanks,
Shimin
Hi Shimin Cai,
You can use Key-Value Observing approach for this. You can add an observer for "self.mapView.locationDisplay.mapLocation" and every time it changes you just insert a new point
into the AGSSketchGraphics which is already instantiated with an AGSMutablePolyline.
Let me know if this helps.
Hi Gagandeep,
Thanks for the idea. I'll give it a go...
Cheers,
Shimin
Have you checked out the GPSSketchingSample ?
Hi Divesh,
Thanks for the suggestion.
Yes I did. It uses a sketchGraphicsLayer as the mapView.touchDelegate and inserts a point into the sketchGraphicsLayer in the locationManager's delegate whenever there is a location update. If I don't set up the map's touch delegate it doesn't work. In my case, the map's touch delegate has been already used by the sketching (point, line & poly) on the main thread. I need to record user's movement in a background thread without any user interaction...
Thanks,
Shimin