To achieve this, ESRI ArcGIS 10.1.1 uses the GPS device in ios skd to navigate the map.
References: http://gis.stackexchange.com/questions/57487/force-arcgis-ios-to-use-gps-data-from-external-gps-device
Example:
Http://www.arcgis.com/home/item.html? Id = 5e9fe50031f5461796b5d158a11d0bad
Steps:
- Define a mapview object.
AGSMapView* _mapView;
- Use the locationdisplay Method
[Self. mapview. locationdisplay addobserver: Self forkeypath: @ "navigationmode" Options :( nskeyvalueobservingoptionnew) Context: NULL]; self. mapview. locationdisplay. autopanmode
= Agslocationdisplayautopanmodenavigation;
- Switch the location switch function
-(Ibaction) locationbtnclicked :( ID) sender {nslog (@ "start locating"); If (! Self. mapview. locationdisplay. performancestarted) {[self. mapview. locationdisplay startdatasource]; self. mapview. locationdisplay. autopanmode = agslocationdisplayautopanmodedefault; // set a wander extent equal to 75% of the map's envelope // The map will re-center on the location symbol only when // The symbol moves out of the wander extent/ /self. mapview. locationdisplay. wandreextentfactor = 0.75;} else {[self. mapview. locationdisplay stopdatasource] ;}}
- Implementation and positioning Methods
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context {}