I am populating angular google map with more than 50k coordinates and also using marker cluster, with 10 to 15k map is a little bit slower but it was loading. I can zoom or click on the cluster to view particular marker information. in case of 50k or more, it is not at all loading entire browser tab is stuck. Please suggest any solution for loading 100k or more markers faster or any maps other than google-maps.
Using angular 5, typescript, JSON response consists of all coordinates and info (which is around 16-20mb for 50k objects), google maps running in ubuntu server.
//index.component.html
<agm-map [latitude]="lat" [longitude]="lng" [zoom]="zoom" [fitBounds]=100>
<agm-marker-cluster [imagePath]="'https://googlemaps.github.io/js-marker-clusterer/images/m'">
<agm-marker *ngFor="let marker of analytics_data;"
[latitude]="marker.latitude"
[longitude]="marker.longitude"
[label]="marker.first_name"
[iconUrl]="marker.icon_url">
<agm-info-window>
<strong>Name:{{marker.first_name}}{{marker.last_name}}</strong><br>
<strong>Mobile:{{marker.gender}}</strong><br>
</agm-info-window>
</agm-marker>
</agm-marker-cluster>
</agm-map>
//index.component.ts
public getAnalytics() {
this._dataService.get(url).subscribe(data => {
this.analytics_data = data["data"];
});
}
{
"status": 200,
"success": true,
"data": [
{
"id": 1,
"first_name": "Sachin",
"last_name": "kumar",
"gender": "male"
"latitude": 26.8346004,
"longitude": 80.9212544
},
{
"id": 2,
"first_name": "satya",
"last_name": "kumar",
"gender": "male",
"latitude": 26.8009544,
"longitude": 80.8946128
}...
}
I expect google map should load faster, but currently it is not loading or stuck.