You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2022/12/05 16:48:23 UTC

[GitHub] [cordova-plugin-geolocation] ravikumarb-cube commented on issue #255: Unable to fetch Location on VIVO Devices

ravikumarb-cube commented on issue #255:
URL: https://github.com/apache/cordova-plugin-geolocation/issues/255#issuecomment-1337714230

   let trackGps;
   public captureCurrentLocation() {
       if (trackGps) {
         (window as any).LocationServices.clearWatch(this.trackGps);
       }
       const options = { // options for capturing the geolocation
         enableHighAccuracy: true,
         timeout: 10000,
         maximumAge: 0,
       };
   
       const success = (position: any) => {
         console.log('Your current position is:');
         console.log(`Latitude & Longitude : ${position}`);
       }
   
       const error = (err: any) => {
         console.log(`ERROR(${err.code}): ${err.message}`);
       }
       trackGps = (window as any).LocationServices.watchPosition(success, error, options);
   }


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org