xkjyeah / vue-google-maps

Google maps component for vue with 2-way data binding
https://xkjyeah.github.io/vue-google-maps/
1.88k stars 474 forks source link

Google Maps JavaScript API warning: NoApiKeys #697

Open Branksy opened 4 years ago

Branksy commented 4 years ago

I keep getting this notification despite providing a valid kay that otherwise works when inserted with a script tag on another app. Please assist.

velkymx commented 4 years ago

@Branksy please post your javascript code so that the issue can be reviewed

Branksy commented 4 years ago

I should add this is for vue2-google-maps fork:

import * as VueGoogleMaps from "vue2-google-maps"; Vue.use(VueGoogleMaps, { load: { apiKey: [APIKEY] v: '3.39', }, })

Map loads with 'for development purposes only' and console warning: 'Google Maps JavaScript API warning: NoApiKeys'

Branksy commented 4 years ago

Just discovered why - error was mine:

As stated on Google Cloud Console, Credentials page: "Use this key in your application by passing it with key=API_KEY parameter."

So the parameter inside load has to be: { key: [APIKEY] } ....rather than apiKey...works fine now.

Mistake must have crept in from a previous library. My apologies.