Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var options = {
- enableHighAccuracy: true,
- timeout: 5000,
- maximumAge: 0
- };
- function success(pos) {
- var crd = pos.coords;
- if(crd.accuracy < 25){
- // usamos apenas as com presicao menor que 25
- }
- };
- function error(err) {
- console.warn('ERROR(' + err.code + '): ' + err.message);
- };
- navigator.geolocation.getCurrentPosition(success, error, options);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement