@salehin 1# watchPosition should be better. However I've heard some reports from people using android that it doesn't work as well as getCurrentPosition.
2# Ofcourse performance wise it will always be better to use the API instead of a plugin. If you are using http://code.google.com/p/jquery-ui-map/ then the overhead would be 4kb and between 0 - 50 milliseconds if you compare adding 10000 markers with the plugin and 10000 markers with Google API. 4kB extra is not that much especially when jQuery ~31KB, jQM ~20KB + ~7KB CSS, PhoneGap ~130KB (not minified), Google Maps js files (~85KB) (plus atleast ~80KB in images). But if you are trying to optimize then ofc there is no need to use the plugin (unless you write more code than it would be with writing with the plugin). The best thing performance wise would be not to use jQuery, jQM, any jQuery plugins and use Google static Maps instead of the JS API. @Kesuke and @Chris If he is using the jquery-ui-map it is a plugin for jQuery, jQuery UI and jQuery Mobile. /Johan On 8 Aug, 01:10, salehin <[email protected]> wrote: > Hi, > > I am developing an mobile application using google map, phonegap and > jQueryMobile. In the map I have to show users > position update, so first time I am pulling the position using > "navigator.geolocation.getCurrentPosition" and letter using > "navigator.geolocation.watchPosition" in a certain interval. In this > scenario I have two quereis: > > 1# Which option is good...what I am doing now or calling > "navigator.geolocation.getCurrentPosition" everytime when I need to > update? > > 2# I am using jquery.ui plugin for Google map. Should I use this one > or I should use google map api directly? For mobile > which ones performance will be better. > > Thanks, > -Salehin -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.
