angular - Google maps becomes slow when customized marker styles -


using google-maps angular2 project, have following marker object map -

private defaultmarkerstyle = {         path: google.maps.symbolpath.circle,         scale: 6,         fillopacity: 0.8,         fillcolor: '#5a7793',         strokecolor: '#ffffff',         strokeweight: 2,     }; let markeronmap = new google.maps.marker({             position: new google.maps.latlng(lat, long),             title: marker.name,             icon: this.defaultmarkerstyle, // <- removing line works fine!!??             map: this.googlemap,             visible: true,         }); 

when map loads more 1000 markers, zoom in / out actions become slow , has lag.

but when remove icon property map,it works fine (see comment in above example)

please suggest.


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -