-
Notifications
You must be signed in to change notification settings - Fork 255
Open
Description
Create some google-map-marker with content (infowindow) via dom-repeat template bounded to a data array. When the bound data changes, the position of all the markers are updated, but the contents are not.
I think this is because dom-repeat efficiently reuses existing doms. When google-map calls _attachChildrenToMap, child.map could already be set to the current map. Since the value is not updated, google-map-marker's _mapChanged and indirectly _contentChanged method is never called.
The MutationObserver attached in _contentChanged is also never fired because of this.
Example
<template is="dom-repeat" items="[[data]]">
<google-map-marker latitude="[[item.latitude]]" longitude="[[item.longitude]]">
[[item.details]]
</google-map-marker>
</google-map>
Polymer({
properties: {
data: {
type: Array,
value: [{
latitude: 10.0,
longitude: 10.0,
details: "OLD VALUE",
}]
}
},
ready: function() {
this.data = [{
latitude: 20.0,
longitude: 20.0,
details: "CURRENT VALUE"
}];
}
})
Metadata
Metadata
Assignees
Labels
No labels