navigator.geolocation.getCurrentPosition gives 400 error with Meteor application -


here code:

if(navigator.geolocation) {     navigator.geolocation.getcurrentposition(         (position) => {             var latlng = l.latlng(position.coords.latitude, position.coords.longitude);             this.map.setview(latlng, 13);         },         (positionerror) => {             console.log("getcurrentposition.positionerror = %j", positionerror);         },         {             maximumage: 600000, timeout: 10000         }     ); } 

this gives me following errors in turn:

  1. positionerror {code: 2, message: "network location provider @ 'https://www.googleapis.com/' : returned error code 400."}
  2. positionerror {code: 3, message: "timeout expired"}

i running locally in meteor app. same results on chrome, chromium , firefox on kubuntu 15.10 , chrome on mac os.

how can work correctly?


Comments