dapriett / nativescript-google-maps-sdk

Cross Platform Google Maps SDK for Nativescript
MIT License
244 stars 164 forks source link

My location button doesn't work on iOS #375

Open ebiscardi opened 4 years ago

ebiscardi commented 4 years ago

I use nativescript-google-maps-sdk in my application with Nativescript at 6.1.2 version. The button to go to my position doesn't works on iOS. The same problem is in the demo application. On Android all works fine.

Giovanni2293 commented 4 years ago

Good day. Im also having this issue, some help could be good. My workspace is:

Nativescript 6.2.0 Platform IOS 6.2.0 nativescript-google-maps-sdk 2.8.1

As described before by ebiscardi, it works on Android but on ios doesn't.

dnepromell commented 4 years ago

the same for me

Log3n commented 4 years ago

I am experiencing the same issue. It might be related to iOS 13. For the time being I can offer you a small workaround:

if (isIOS) {
    this.map.on("myLocationTapped", event)=> {
        geolocation.isEnabled().then(enabled => {
            if (enabled) {
                geolocation.getCurrentLocation({
                    maximumAge: 5000,
                    timeout: 20000
                }).then(location => {
                    this.map.gMap.animateToLocation(location);
                });
            }
        });
    });
}

You will need to use the geolocation plugin tho.

HasikaDilshani commented 3 years ago

Can I know whether this issue is fixed or not yet?