Ionic3 geoLocation не работает на Android или Chrome, но работает на устройстве IOS и края, - PullRequest
0 голосов
/ 01 ноября 2018

Я не могу получить местоположение в Ionic3

ionViewDidLoad(){
var options = {
  timeout: 5000
};
this.platform.ready().then(() =>{
this.geoLocation.getCurrentPosition(options).then(resp => {
  console.log(resp.coords.latitude)
  console.log(resp.coords.longitude)
  this.latitude = resp.coords.latitude
  let userLocation = {"user_latitude": resp.coords.latitude,"user_longitude": resp.coords.longitude}
  this.getStore.getStores(userLocation).then((result) => {
  this.store = result;
  this.storeDetails = this.store.store_details;
  console.log(this.storeDetails);
},); 
}).catch(() =>{
  console.log("Error to get your location");
}); 

image

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...