Page 1 of 1

Difference between GeoLocation Service and watchPosition()

Posted: Tue Sep 03, 2013 10:25 pm
by Helen

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


Difference between GeoLocation Service and watchPosition()

Posted: Wed Sep 04, 2013 3:25 am
by maxkatz

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.


Difference between GeoLocation Service and watchPosition()

Posted: Wed Sep 04, 2013 4:17 am
by Helen

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?


Difference between GeoLocation Service and watchPosition()

Posted: Wed Sep 04, 2013 4:23 am
by maxkatz

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.


Difference between GeoLocation Service and watchPosition()

Posted: Wed Sep 04, 2013 1:31 pm
by Helen

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


Difference between GeoLocation Service and watchPosition()

Posted: Wed Sep 04, 2013 4:06 pm
by maxkatz

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


Difference between GeoLocation Service and watchPosition()

Posted: Wed Sep 04, 2013 4:06 pm
by maxkatz

We will remove it from the service.