Closed Swatinem closed 11 years ago
Looks great, merging!
Wow that was fast :-)
Well there is however a slight problem because the interaction abuses markers to create tooltips. Those end up with marker.data
being an empty object. Users of the key function should be aware of that.
So key(function (f) { return f.properties.id; })
yields a TypeError because f.properties is undefined.
In my case I just dealt with this inside the key function itself, not sure how to solve it in a better way.
markers.js keeps a cache of markers used for a feature to not re-create the marker when a feature is repositioned. That cache is however never cleared when a feature is removed, making it impossible to re-add the same feature after removing it once.