0

我在我的项目中使用 agm 地图,API 服务在邮递员中需要 3 秒,在 UI 中加载需要 1 分钟,并且在填充数据时 ui 挂起。

我正在使用 agm map,是否有任何建议可以更有效地加载数据,您能否建议一些代码。

下面是我正在使用的代码。

 <agm-map [latitude]="latitude" [longitude]="longitude" [zoom]="16" [fitBounds]="100" >
  <agm-marker-cluster [maxZoom]="maxZoom" [gridSize] = '50' [averageCenter]= 'true' imagePath="https://raw.githubusercontent.com/googlearchive/js-marker-clusterer/gh-pages/images/m">
 <agm-marker *ngFor="let data of mapArrayListAccordingParams;let i=index" [latitude]="data.latitude" [longitude]="data.longitude"
 (markerClick)="clickedMarker(infowindow,data);selectedEmp = data;newSelectedEmp.push(data)" >
<agm-marker>
<agm-marker-cluster>
 <agm-map >
4

0 回答 0