Feb 17, 2014

MyLocation&MyPath (some added version)




I used to 'watchPosition' method for 'function getMylocation()'.

  1. function getMylocation(){
  2.     firstTime=false;
  3.     if(navigator.geolocation) {
  4.      keycnt=navigator.geolocation.watchPosition(success,error2,geoOptions);
  5.     } else {
  6.    handleNoGeolocation(false);
  7.   }
  8. }

It detect to your location is changed.

And I add option that 'enableHighAccuracy'.


  1. geoOptions={
  2.       enableHighAccuracy : true,
  3.       timeout: 5000,
  4.       maximumAge: 0
  5.   };


It option is Increases the accuracy of location.



No comments:

Post a Comment