Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bw_show_googlemap] needs an API key #41

Closed
bobbingwide opened this issue Jun 25, 2016 · 0 comments
Closed

[bw_show_googlemap] needs an API key #41

bobbingwide opened this issue Jun 25, 2016 · 0 comments

Comments

@bobbingwide
Copy link
Owner

bobbingwide commented Jun 25, 2016

When I first changed [bw_show_googlemap] to use Google maps API v3 it didn't require the API key that was needed in v2. This was in oik v 1.3.

Some time ago Google started displaying Warning messages in the JavaScript console saying.

Google Maps API warning: NoApiKeys https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys

Google Maps API warning: SensorNotRequired https://developers.google.com/maps/documentation/javascript/error-messages#sensor-not-required

On most of my accounts the Google map is displaying correctly.

On a new 1&1 account however the Google map is displayed briefly before it switches to

Sorry! Something went wrong.
This page didn't load Google Maps correctly. See the JavaScript console for technical details.

Where we see not only the two warnings but also an Error.

Google Maps API error: MissingKeyMapError https://developers.google.com/maps/documentation/javascript/error-messages#missing-key-map-error_.ab @ js?sensor=false&region=GB:32(anonymous function) @ common.js:51(anonymous function) @ common.js:189c @ common.js:45(anonymous function) @ AuthenticationService.Authenticate?1shttp%3A%2F%2Fwww.irenelock.co.uk%2Fcourse_location%2Fbridestow…:1

Workaround

Providing an API key and removing the sensor=false parameter, in a custom version of the code, resolves the problems.

Proposed solution

Add support for specifying the Google maps API key in oik options, reusing the google_maps_api_key option name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant