-
Notifications
You must be signed in to change notification settings - Fork 10
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
Adding API key, prevent the map from loading #1
Comments
By looking at elm's output code, seems like it first calls var mapElement = document.createElement('google-map');
mapElement.apiKey = '...';
document.body.appendChild(mapElement); Probably, this is considered a bug in Relavant: [1] GoogleWebComponents/google-apis#67 [same issue with angular] |
@bmamouri I managed to create a workaround for this issue by putting |
@lisardo do you have a snippet or a Gist ? I'm having the same issue |
@theocar I'll create a gist later today when I have some time |
Thanks @lisardo ! waiting for It |
hey @lisardo did you have time to make a small Gist ? Thanks for your help . |
Workaround bug in the google-map web component prevent its from working with Elm when using api keys. rtfeldman#1
@theocar I created a quick demo to show what was my solution |
@lisardo great ! Thanks |
When I add the map directly using web component, the map rendered successfully:
However, when I add the key to the Elm component, I got an exception that the map was not loaded using API key. This is the Elm code:
The exception:
Strangely when I look at the DOM, the key is there:
I guess this has something to do with how Elm loads the dom elements. Maybe setting the attributes of the webcomponents delayed.
The text was updated successfully, but these errors were encountered: