我正在為我的角度應用程式使用 AGM Google 地圖,并嘗試從代碼中洗掉街景小人和全屏選項。這是我的代碼。
<agm-map [latitude]="lat" [longitude]="lng" [styles]="styles" [zoom]="zoom" [disableFullscreen]="true" [disablePegman]="true">
<agm-marker [latitude]="lat" [longitude]="lng"></agm-marker>
</agm-map>
任何的想法?我在這里做錯了什么?
uj5u.com熱心網友回復:
HTML
<agm-map (mapReady)="onMapReady($event)"
TS
onMapReady(map?: google.maps.Map ){
if(map)
map.setOptions({
streetViewControl: false,
fullscreenControl: false
});
}
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/469163.html
上一篇:將結果從JSON動態決議為串列
