Google map not showing with nativescript-google-maps-sdk

ios

#1

I’m having an issue with the nativescript-google-maps-sdk plugin, the map does not load however I see the google logo on the left corner. Everything is setup as per instructions, including checking that I have a valid Google Maps API key and is unrestricted.

Is there an issue with showing the map on the simulator? Using the iOS simulator, nativescript 4.1. Any help much appreciated!


#2

Try to console map lat long and center on onMapReady().
I have also faced this problem earlier and realised marker and center position was wrong.


#3

I see the marker I added right in the middle of the screen but no map is showing. I can actually move the camera around and marker moves along (also Lat and Long look ok in the console)…


#4

Where are you adding your api key? is it in modules.ts like this
if (platform.isIOS) {
GMSServices.provideAPIKey(“XXXXXXX”);
}


#5

I have it in app.js

if(application.ios) {
GMSServices.provideAPIKey(“xxxxxxx”);
}

Could it be that it not initialising properly? is there a way to check that onMapReady?


#6

OK turns out I hadn’t enabled the Google Maps SDK for iOS in Google console… Thanks so much @nmongiya for pointing me in the right direction about the key. Wish the plugin would show something in the logs.