nativescript-google-maps-sdk icon indicating copy to clipboard operation
nativescript-google-maps-sdk copied to clipboard

My location button doesn't work on iOS

Open ebiscardi opened this issue 5 years ago • 4 comments

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.

ebiscardi avatar Oct 22 '19 09:10 ebiscardi

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.

Giovanni2293 avatar Nov 06 '19 19:11 Giovanni2293

the same for me

dnepromell avatar Nov 10 '19 17:11 dnepromell

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.

Log3n avatar Jan 08 '20 18:01 Log3n

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

HasikaDilshani avatar Oct 29 '20 08:10 HasikaDilshani