Skip to content

mrameezraja/cordova-plugin-gps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GPS Plugin

GPS plugin for android.

Installation

cordova plugin add https://github.com/mrameezraja/cordova-plugin-gps

Methods

  • cordova.plugins.gps.getStatus
  • cordova.plugins.gps.isEnabled
  • cordova.plugins.gps.getCurrentLocation

cordova.plugins.gps.getStatus


  cordova.plugins.gps.getStatus(function(gpsstats){
    console.log(JSON.stringify(gpsstats));
  }, function(error){
    console.log(error);
  })

Response fields:

  • gpsEnabled
  • gpsFix
  • grade
  • accuracy

cordova.plugins.gps.getCurrentLocation


  cordova.plugins.gps.getCurrentLocation(function(position){
      console.log(JSON.stringify(position));
  }, function(error){
    console.log(error);
  })

cordova.plugins.gps.isEnabled


  cordova.plugins.gps.isEnabled(function(gpsisEnabled){
    console.log("isEnabled: " + gpsisEnabled);
  });

gps.enabled


  window.addEventListener('gps.enabled', function(){

  });

gps.disabled


  window.addEventListener('gps.disabled', function(){

  });

Supported Platforms

  • Android

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published