performance - Handling large data set(100000) on Google Map using angular2 -
i using google map in angular2 app. have used markercluster below.
(let marker of this._markers) { let lat = +marker.latitude; let long = +marker.longitude; let markerobj = new google.maps.marker({ position: new google.maps.latlng(lat, long), title: marker.name, icon: { path: google.maps.symbolpath.circle, scale: 6, fillopacity: 0.8, fillcolor: '#5a7793', strokecolor: '#ffffff', strokeweight: 2, }, map: this.map, visible: true, }); this.markerlayer.push(markerobj); latlngbounds.extend(markeronmap.getposition()); markerlist.push(markeronmap); } let markercluster = new markerclusterer(this.map, markerlist, { imagepath: '../assets/images' }); i want show around 100000 markers on google map. facing lot of performance issues when tried plot 100000 markers.
as per client requirement can not use other map libraries. need stick google map.
do have suggestion me improve performance.
you don't plot 100,000 markers @ once. need reduce amount of data displaying @ time. display individual markers when zoomed in there not many markers in view.
so suggest load markers server based on bounds of google map. coordinates @ top left , bottom right.
so lets have 100,000 markers spread on world. @ world view best not show , ask user zoom in. once @ lower zoom level use bounds of map markers server lie inside bounds. should reduce number of markers have display substantially. don't know coverage of data can figure out zoom levels work best you.
Comments
Post a Comment