Ionic 2 map loading "Uncaught (in promise): [object PositionError]"

initMap(): Promise<any> {

this.mapInitialised = true;//part 1

return new Promise((resolve) => {


  this.geolocation.getCurrentPosition().then((position) => {// Part 2
let latLng = new google.maps.LatLng(position.coords.latitude,position.coords.longitude);

    let mapOptions = {
      center: latLng,
      zoom: 15,
      mapTypeId: google.maps.MapTypeId.ROADMAP
    }

    this.map = new google.maps.Map(this.mapElement, mapOptions);
    resolve(true);

  });

});
}

Any solutions? Did you solve it?

Just a heads up if you’re trying to run that in a browser, it won’t work.