scottdejonge / map-icons

An icon font for use with Google Maps API and Google Places API using SVG markers and icon labels
http://map-icons.com/
MIT License
1.05k stars 198 forks source link

performances issue #70

Closed eregnier closed 6 years ago

eregnier commented 6 years ago

Hi there. I noticed that your markers are repainted many times when the map is under dragging. in fact, the following code:

        this.div.innerHTML = this.get('text').toString();

        div.style.zIndex = this.get('zIndex'); // Allow label to overlay marker
        div.style.position = 'absolute';
        div.style.display = 'block';

in the labelDraw method in the map-icon.js file is very perf killer. It should be interesting for weaker devices to implement a kind of debounce method that would repaint markers lately.

eregnier commented 6 years ago

deprecated project.