-
Notifications
You must be signed in to change notification settings - Fork 256
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
dom-repeat and google-map-marker problem #149
Comments
You can't manually add an item to a dom-repeat template. It gets generated, and regenerated automatically from an array. |
I haven't added an item manually to the DOM template, I have used the Polymer API to modify arrays (in the first approach): P.S. I had a mistake in my last comment, the approach that works is the second one. |
You are right, you did do the right thing. If the element was in dom, it should have been picked up by mutationobserver, and added to map. Who knows, if you'd like to pursue this, create a jsbin somewhere, and I can trace it through. |
@atotic |
I have the following snippet:
was trying to add a
google-map-marker
in my map when the user click in it so thehandleMapClick
function is as follows:with this function the new
google-map-marker
are added to the DOM (although they are added doubled) but the map doesn't show them.I try another approach that seems to work:
I checked that the
_updateMarkers
method ofgoogle-map
is executed with both approaches but only works with the first. What is the problem with the first approach?Thank you.
The text was updated successfully, but these errors were encountered: