Select to view content in your preferred language

GPS feature does not appear to be working

693
5
10-04-2011 07:54 AM
TerrenceHannon
Emerging Contributor
While working on a new universal ArcGIS view based project using the latest API I tried to turn on the GPS feature using:

[self.mapView.gps start];


Unfortunately it appears to do nothing on either device (both have the latest iOS update) or the simulator. Manually checking the gps point claims it is at 0,0 and the enabled property is false. Location services are turned on for the devices but there is no entry appearing for the project to toggle Location Services individually.

Just to test I manually created and started up a LocationManager which behaved as expected by finding the current point and creating an entry for the app in the Location Services menu, but it seemed to have no effect on the GPS feature.

Not sure if I'm missing something from the documentation or if there is a delegate I need to work with. I would really love to use the GPS feature as opposed to manually using CoreLocation again, any assistance is greatly appreciated.
0 Kudos
5 Replies
NimeshJarecha
Esri Regular Contributor
It should just work. Try switching your location service on-off or device. Also, note that just doing "[self.mapView.gps start]" won't take you to the current location. You'll have to set the self.mapView.gps.autoPan = TRUE.

Regards,
Nimesh
0 Kudos
TerrenceHannon
Emerging Contributor
I am aware of the panning feature, not the problem as despite using it, zooming all the way out, or looking at my current location on the map there are no points at all.

I'm thinking the GPS is not actually starting as the point never changes from 0,0 nor does the enabled  properly ever seem to switch to YES.

I tried toggling the location service a few times and re-starting the app with it on or off nothing seems to be fixing it.
0 Kudos
NimeshJarecha
Esri Regular Contributor
Surprising! Are you able to see the GPS working in any other application on device? like Maps etc?

Restart Device!

Regards,
Nimesh
0 Kudos
TerrenceHannon
Emerging Contributor
GPS works both on the default Maps app and on an app I wrote previously that used the regular mapkit and Core Location. As far as I can tell the problem is only with the ArcGIS implementation at the moment.

I've now tried it on both AT&T and Verizon iPhone 4s, an At&T iPad1, and pair of At&T and Verzion iPad2s. The ArcGIS GPS feature does not work on any of them in the three different test apps I whipped up. Every other feature I've tried has worked so far with the API on multiple devices.
0 Kudos
NimeshJarecha
Esri Regular Contributor
Did you test this with iOS 5 final SDK?

Regards,
Nimesh
0 Kudos