GoogleWebComponents / google-map

Google Maps web components

Home Page:https://elements.polymer-project.org/elements/google-map

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

using clear() doesn't *really* clear map markers

tigerhawkvok opened this issue · comments

for a map m, calling map.clear() does remove the markers from the screen, but it doesn't clear the element's internal memory.

Therefore, if after calling map.clear() I run

        marker = document.createElement "google-map-marker"
        marker.setAttribute "latitude", point.lat
        marker.setAttribute "longitude", point.lng
        marker.setAttribute "animation", "DROP"
        Polymer.dom(mapElement).appendChild(marker)

All the markers that were previously cleared reappear.