Trying to add GPS "Locate me" feature.

275
1
03-14-2011 09:07 PM
LoganLehman
New Contributor
Hi guys,

I am pretty experienced in iOS development, yet not in ArcGIS. I currently have a tabbed view app running a street base map, and a custom layer provided to me by my employer. Since this is a contract job, I am currently running into some issues on how to add the GPS feature to the mapView.

All I need really is a simple explanation on how implement the ArcGIS "Locate me" Target button, and have it work.

Sorry for the somewhat newbie question and thanks to everyone who may be able to help,

Logan
0 Kudos
1 Reply
NimeshJarecha
Esri Regular Contributor
Hi Logan,

I would suggest looking at the MapViewDemo sample which is getting installed with ArcGIS API for iOS (${HOME}/Library/SDKs/Samples). It uses GPS.

In short, you should just need to call [self.mapView.gps start] and [self.mapView.gps stop] in your button to start and stop GPS respectively. When you start GPS and want to automatically zoom to the current location then set self.mapView.gps.autoPan property to TRUE.

Hope this helps!

Regards,
Nimesh
0 Kudos