Google地图-Angular2 -ng2-map-加载大量多边形

时间:2018-06-22 14:34:58

标签: angular google-maps geometry polygons

当我尝试加载大量多边形/圆形(例如3000)时,Google地图未显示任何内容。但是它正在加载2500个多边形/圆形。也没有控制台错误。

我正在使用多边形数组进行加载。

有人有什么主意吗?

<ng2-map [zoom]="mapOptions.zoom" [minZoom]="mapOptions.minZoom" [center]="mapOptions.center" clickable="false" (onMapReady)="onMapReady($event)" *ngIf="showInMapClicked">
    <map-polygon  *ngFor="let polygonData of jurisdictionPolygons"
        [paths]="polygonData"
        [strokeColor]="mapShapeOptions.strokeColor"
        [strokeOpacity]="mapShapeOptions.strokeOpacity"
        [strokeWeight]="mapShapeOptions.strokeWeight"
        [fillColor]="mapShapeOptions.fillColor"
        [fillOpacity]="mapShapeOptions.fillOpacity" 
        [draggable]="mapShapeOptions.draggable" 
        [editable]="mapShapeOptions.editable" zindex="2">
    </map-polygon>
    <map-circle  *ngFor="let circleData of jurisdictionCircles" 
        [center]="circleData.geocode"
        [strokeColor]="mapShapeOptions.strokeColor"
        [strokeOpacity]="mapShapeOptions.strokeOpacity"
        [strokeWeight]="mapShapeOptions.strokeWeight"
        [radius] ="circleData.radius"
        [fillColor] = "mapShapeOptions.fillColor" 
        [fillOpacity]="mapShapeOptions.fillOpacity"
        [draggable]="mapShapeOptions.draggable" 
        [editable]="mapShapeOptions.editable" zindex="2">
    </map-circle>
</ng2-map>

0 个答案:

没有答案