Helen
Posts: 0
Joined: Wed Aug 28, 2013 8:35 pm

Difference between GeoLocation Service and watchPosition()

Hi,
I'm confused by which method to use to track user's location and proximity to a set of coordinates.
What's the difference between adding Appery's geolocation Service versus calling PhoneGap's geolocation.watchPosition ?

Also can you please specify how to test both?

It seems I'm able to test both in browser while on iPhone (without having to install). Is this accurate?

Thanks for your help,

Helen

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Difference between GeoLocation Service and watchPosition()

The Geolocation service in Appery.io is PhoneGap's geolocation API. We simply exposed the API as service.

You can test in the browser or as installed app. When testing just in the browser, the API uses browser's location API.

Helen
Posts: 0
Joined: Wed Aug 28, 2013 8:35 pm

Difference between GeoLocation Service and watchPosition()

Thanks Max.

I am able to test in the browser. I'm not sure what you mean by following:
"When testing just in the browser, the API uses browser's location API"
... does this mean it's not using native device but browser features?

Since I need to track user's location, is it possible to test in iPhone's browser while walking? I've tried this and my location is not updated as I walk.
Will I get better results by a different testing method?

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Difference between GeoLocation Service and watchPosition()

Yes, browsers have location API: https://developer.mozilla.org/en-US/d...

Constantly get the location, you would need to invoke the service all the time.

Helen
Posts: 0
Joined: Wed Aug 28, 2013 8:35 pm

Difference between GeoLocation Service and watchPosition()

Regarding the Service, is the 'frequency' request parameter a means of invoking the service continually?

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Difference between GeoLocation Service and watchPosition()

It's an old property that's not used anymore: http://docs.phonegap.com/en/1.2.0/pho...

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Difference between GeoLocation Service and watchPosition()

We will remove it from the service.

Return to “Issues”