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

Google Maps plugin to include API Key #68

Open
menismu opened this issue Jan 11, 2019 · 2 comments
Open

Google Maps plugin to include API Key #68

menismu opened this issue Jan 11, 2019 · 2 comments

Comments

@menismu
Copy link
Owner

menismu commented Jan 11, 2019

Google Maps API requires an API key and billing details to be activated. Plugin needs some refactoring work to allow API keys, see documentation for further details.

@titaniumbones
Copy link

titaniumbones commented Mar 11, 2019

@menismu I made some simple changes that kind of work. There are some problems however:

  • it's not possible to get the tests to work without committing an ApiKey to git, which doesn't seem like a good choice
  • as currently written, users have to add an api key property to every instance of hte google map plugin. This is awkward and error-prone (EDIT: see below)

I'd like to make two changes to improve the situation:

  • allow the API key to be passed as a global parameter when Popcorn is initialized, so that the key can be written out just a single time Actually, this is already possible with the .defaults() method. So this just needs to be documented;
  • add dotenv as a node dependency so that the apikey can be stored in a .env file. devs will have to register individually for an API key, but that doesn't seem like such a huge burden and on balance is better than what we have, I think. However, I'm not familiar with qunit, so am not sure how to inject that value into web pages; and also the example page (popcorn.googlemaps.html) will still break, though perhaps that can be easily rewritten to indicate that an API key is necessary.

If you approve of that direction, I'll start on the changes right away. please let me know if you can. thanks!

@titaniumbones
Copy link

I think this can be closed now?

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

2 participants