-
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
Issues with Dom-repeat and Map Markers #356
base: master
Are you sure you want to change the base?
Conversation
The current version is not able to handle changes to array of markers added via dom-repeat template. Updated the listener to observe 'iron-items-changed' event at line 534. The listener is now able to update all the markers when there is a change in items array. Please note that this code does not update the info window content. The following code now works correctly. google-map map="{{map}}" api-key=xxxx latitude="[[lat]]" longitude="[[lon]]"> <template is="dom-repeat" items="[[array]]"> <google-map-marker map="[[map]]" latitude="[[item.lat]]" longitude="[[item.lon]]" title="[[item.title]]" ></google-map-marker> </template> </google-map>
Currently when using dom-repeat template, the info windows are not updated when the item array is updated. This change to mutation observer allows the info window content to update automatically.
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
I am having the same issue with the infowindow. I tested your update to infowindows and it fixed the issue. I am now getting a side effect where opening the info window on one marker will trigger opening other markers and sometimes close the clicked marker |
Hi jparish3,
I had tested it out with 4 markers and text only content in infoWindow and did not notice this unusual behavior. You can also check what are the versions of your dependencies using bower list. Thanks, |
I signed it! |
CLAs look good, thanks! |
I was unable to get the data binding to work when using google-map-markers inside dom-repeat template.
Made 2 changes to the code to enable dynamic updating of google map markers and their contents.
The following code now works well to render markers on google map when bound to an items array.
Possible issues resolved #299 #319 #297 #288 #263