【发布时间】:2019-03-26 15:09:01
【问题描述】:
我在将 KML 上传到 AGM(Angular Google Maps API)时遇到问题。 我已使用 KML 文件的全局 URL 将 KML 图层添加到 AGM-Map。应用程序没有给出任何错误,但 KML 没有显示在谷歌地图上。
我正在使用 Angular 5.2.9 和 "@agm/core": "^1.0.0-beta.3"
下面是代码sn-p。
<agm-map [latitude]="-24" [longitude]="135" [zoom]="5" (mapClick)="placeMarker($event)" >
<agm-marker [latitude]="r.Latitude" [longitude]="r.Longitude" *ngFor="let r of embargoViewModelListEnable; " [iconUrl]="location.icon">
<agm-info-window>Latitude : {{r.Latitude}}, Longitude : {{r.Longitude}} PostCode :{{r.PostCode}}</agm-info-window></agm-marker>
<agm-marker [latitude]="p.Latitude" [longitude]="p.Longitude" *ngFor="let p of embargoViewModelListDisable; " [iconUrl]="location1.icon">
<agm-info-window>Latitude : {{p.Latitude}}, Longitude : {{p.Longitude}} PostCode :{{p.PostCode}}</agm-info-window></agm-marker>
<agm-kml-layer [url]="'https://www.dropbox.com/s/3bndf59gz24aokg/PO_0800.kml?dl=0'"> </agm-kml-layer>
</agm-map>
【问题讨论】:
标签: google-maps-api-3 angular5 kml angular-google-maps