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
Post a Comment