我使用Angular Google Maps组件,除了自定义图标外,所有组件都运行良好。我把它设置如下。你能告诉我为什么它不起作用吗?
mapOptions = {
center: { lat: store.latitude, lng: store.longitude },
zoom: 11,
mapId: environment.googleMapId,
icon: 'https://developers.google.com/maps/documentation/javascript/examples/full/images/beachflag.png',
} as google.maps.MapOptions;
我的坏。我需要将其设置在MarkerOptions
下,如下所示:
markerOptions: {
icon: {
url:
'https://developers.google.com/maps/documentation/javascript/examples/full/images/beachflag.png',
}, draggable: false
}