I followed the instructions on https://www.npmjs.com/package/@ionic-native/google-maps
but when I load my app I only see a grey box on it.
Steps
1-Installed npm install @ionic-native/core @ionic-native/google-maps
and then
2-I generated the key following the instructions on
https://github.com/ionic-team/ionic-native-google-maps/blob/master/documents/api_key/generate_api_key.md
3-then I executed
ionic cordova plugin add cordova-plugin-googlemaps --variable API_KEY_FOR_ANDROID="my_key" --variable API_KEY_FOR_IOS="my_key"
4-After all of this
ionic cordova run android
But when the app load I only see a grey box.
Any help?
Thank you.
Regenerate api key, then retry step4.
me too
dont work even with new key, grey box with google logo but no map loaded
Gray map means your api key doesn't allow to use Google maps api or your app fingerprint is mismatch with restrictions. This is not bug, it's YOUR problem. Make sure everything.
after read carefully here, maybe this is the cause.
https://docs.google.com/presentation/d/1zlkmoSY4AzDJc_P4IqWLnzct41IqHyzGkLeyhlAxMDE/edit#slide=id.g39c2af405f_841_328
Even if you don’t register your payment after the grace period, Google Map in your app would be gray map or something. (I confirmed to Google)
will try it this afternoon or tomorrow
can we get a callback or error code to identified it?
Yes, I regenerated the keys but not map at all.
I'm going to remove this feature for the moment...
😕
Oscar
On May 27, 2018, at 11:26 PM, msyahidin notifications@github.com wrote:
me too
dont work even with new key, grey box with google logo but no map loaded—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
Even after regenerating api key, I recommend you give up this plugin, and you use Google Maps JavaScript v3.
ping
added billing account
add SHA-1 certificate fingerprint
generate new key
check the api enabled
remove plugin
remove platform
add plugin and platform with new key, still not work
even test it on blank new project. not work still grey
i hope there is some error code show
please suggest me, what should i check again?
btw this is happen when updated to latest version, maybe last choice between downgrade or change to agm
Remove the fingerprint.
It does not work in any way, I tried:
-I regenerate the keys,
-I apply a restriction for use to Android application
-also without any restriction
-etc
-etc
And nothing.
Could someone make it work?
Oscar
On May 30, 2018, at 1:37 AM, Masashi Katsumata notifications@github.com wrote:
Remove the fingerprint.
―
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
I was working yesterday.
ionic cordova plugin rm cordova-plugin-googlemaps
ionic cordova platforms rm android
ionic cordova plugin add cordova-plugin-googlemaps
ionic cordova platforms add android
it worked fine.
I have found the problem,
just like @wf9a5m75 said before, it's because wrong API Key, but not the Key it self wrong.
I am sure inserted the right key.
But the documentation on page this slide https://docs.google.com/presentation/d/1zlkmoSY4AzDJc_P4IqWLnzct41IqHyzGkLeyhlAxMDE/edit#slide=id.g282d0a7bfd_0_107
THIS IS WRONG (DO NOT COPY FROM THERE)
$> ionic cordova plugin add cordova-plugin-googlemaps
--variable API_KEY_FOR_ANDROID=”.....”
--variable API_KEY_FOR_IOS=”.....”
it contain wrong cli format or typo on double quote, it's not quote but like apostrophe.
If you copy the command to the terminal then insert the key, the command will produce this line on config.xml :
<variable name="API_KEY_FOR_ANDROID" value="”KEY”" />
package.json:
"cordova-plugin-googlemaps": {
"API_KEY_FOR_ANDROID": "”ANDROID_KEY”",
"API_KEY_FOR_IOS": "”IOS_KEY”",
"PLAY_SERVICES_VERSION": "15.0.1",
"ANDROID_SUPPORT_V4_VERSION": "26.1.0",
"LOCATION_WHEN_IN_USE_DESCRIPTION": "This app wants to get your location while this app runs only.",
"LOCATION_ALWAYS_USAGE_DESCRIPTION": "This app wants to get your location always, even this app runs in background."
}
And then make your API Key wrong.
Hope the ionic team fix the typo cli command on the documentation. Btw it's nice docs.
@moscarar are you following the documentation in google docs? check your package.json and config.xml, is it the right key?
I believe general programmer understand <variable name="API_KEY_FOR_ANDROID" value="”KEY”" /> is wrong without thinking.
Anyway, congrats.