@BennyTaccardi wrote:
Hi to all, I’m trying to geolocate user in yours current position with ionic-native/geolocation plugin.
My snippet of code is:this.geolocation.getCurrentPosition().then(res => { this.myLat = res.coords.latitude; this.myLon= res.coords.longitude; this.reverseGeocoding(this.myLat,this.myLon); console.log(this.start); this.map = new google.maps.Map(this.mapElement.nativeElement, { zoom: 7, center: {lat: this.myLat, lng: this.myLon} }); this.directionsDisplay.setMap(this.map); this.addMarker(this.map); }).catch((error) => { console.log('Error getting location', error); });On browser it works but on android devices not. What is the trouble? Thanks in advance
Posts: 1
Participants: 1