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

Feature: dynamically loading a google maps API key / config, without ENV variables #239

Closed
stitch opened this issue Jan 6, 2022 · 3 comments · Fixed by #249
Closed

Feature: dynamically loading a google maps API key / config, without ENV variables #239

stitch opened this issue Jan 6, 2022 · 3 comments · Fixed by #249
Assignees
Labels
feature requested A new feature requested for the community nice to have released
Projects

Comments

@stitch
Copy link

stitch commented Jan 6, 2022

Is your feature request related to a problem? Please describe.

Yes: I'm trying to load the API key dynamically, as this is not known op app instantiation. The solution that works with an environment variable is not desirable as that complicates app deployment. We get the key via a JSON call.

Describe the solution you'd like

Any way of loading in the API key / config dynamically, which does not require restarting the app. As mentioned in the examples below.

Describe alternatives you've considered

Based on some searches and documentation, i came up with the known solutions that do not work in this fork.

Method one: using the vue-google-maps docs:

import {GmapVue, load} from 'gmap-vue' as suggested from https://github.com/GuillaumeLeclerc/vue-google-maps#installation

In this case 'load' is not defined. So this wont work.

Method two: attempting to call loadGmapApi

GmapVue.loadGmapApi as suggested in xkjyeah#135

This does not work. While loadGmapApi is mentioned in the library, it cannot be used.

Additional context

@stitch stitch added the feature requested A new feature requested for the community label Jan 6, 2022
@diegoazh diegoazh self-assigned this Feb 15, 2022
@create-issue-branch
Copy link

@diegoazh diegoazh added this to To do in gmap-vue via automation Feb 15, 2022
@diegoazh diegoazh added the WIP work in progress label Feb 15, 2022
@diegoazh
Copy link
Owner

I liked your suggestion so much, I will take a look at these possible solutions.

diegoazh added a commit that referenced this issue Feb 16, 2022
We allow the possibility of loading the Google Maps API dynamically when
you need.

Close #239
diegoazh added a commit that referenced this issue Feb 16, 2022
We allow the possibility of loading the Google Maps API dynamically when
you need.

Close #239
gmap-vue automation moved this from To do to Done Feb 16, 2022
diegoazh added a commit that referenced this issue Feb 16, 2022
We allow the possibility of loading the Google Maps API dynamically when
you need.

Close #239
github-actions bot pushed a commit that referenced this issue Feb 16, 2022
# [3.3.0](v3.2.0...v3.3.0) (2022-02-16)

### Features

* **gmap-vue:** add dynamic loading for google maps api ([7825dba](7825dba)), closes [#239](#239)
@github-actions
Copy link

🎉 This issue has been resolved in version 3.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@diegoazh diegoazh removed the WIP work in progress label Feb 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature requested A new feature requested for the community nice to have released
Projects
No open projects
gmap-vue
  
Done
Development

Successfully merging a pull request may close this issue.

2 participants