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-map with binded api-key, combined with importHref, hides the map #342
Comments
It looks like this may be issues with older element dependencies. I've updated the list of deps and released a new version: https://github.com/GoogleWebComponents/google-map/releases/tag/1.2.0. Can you |
I am still getting the same hidden map when clicking first on the TEST-IMPORT button. I downloaded the latest google-map element with bower, resulting as follow: I also tried the same jsbin pointing to: Do you have a working jsbin with this code that I can look at? What am I missing? |
I dropped http://jsbin.com/dadudagixu/edit?html,output in demo/test.html. Hitting the TEST-IMPORT button first loads the map as expected for me. |
@ebidel you are a magician, but I still don't get it In a new empty folder I run this bower, including google-map, paper-button and firebase-element, all required for the sample code
Then, copy your sample code into google-map/demo/ but when running it, still get the same hidden map. No idea what I am still doing wrong. |
@ebidel any update on this issue? p.s. I just tried with recent 1.8.0 version and still having the same issue. |
@ebidel @Fausto-theXS: Got some similar error where the is not shown. In my case I have an iron-pages which loads a template through an importHref. In that template the google-map is not shown. This is the root cause. When I load it into a template that is loaded eagerly (not with the importHref) it works fine. Maybe this helps. Still haven't found a solution to this problem...
|
I have a similar issue, where the map is not shown when the network is a bit flaky (can't be 100% certain as I only encounter the problem occasionally on mobile network). I have tried to @mrpharderwijk: May I know what do you mean by loading it "eagerly"? Does it mean loading it early in the script (such as in the app shell (i.e. <link rel="import" href="../bower_components/google-map/google-map.html"> |
I have a project where the Google Maps api-key is loaded with the user data through an ajax call, so I am using a dom-if waiting for the api-key to be available, as follow:
That approach works fine, unless in addition to set the mapikey value, the script also does some importHref() calls to load user's custom code (that's my case).
When loading a fairly large import or just a few of them (as the jsbin below), the css associated with #map changes to position:relative and the map gets hidden with height=0
This is the jsbin code, also copied below for easier review
And, this is a working Url for that code.
p.s. If I do the importHref() calls withiin a setTimeout() with 1000 ms, then the issue goes away, but that might fail depending on the imports.
This is the full jsbin code for reproducing this issue
Thanks in advance for your support, Fausto
The text was updated successfully, but these errors were encountered: