0
我需要在拖動標記停在地圖離子MARKER_DRAG_END事件不工作
我加了一個GoogleMapEvent.MARKERS_END它沒有得到triggerd
this.map.addMarker({
title: 'Current Location',
icon: 'red',
animation: 'DROP',
position: {
lat: this.location.lat,
lng: this.location.lng,
},
draggable: true,
})
.then((marker) => {
marker.on(GoogleMapsEvent.MARKER_DRAG_END)
.subscribe(() => {
console.log('dragged');
});
marker.on(GoogleMapsEvent.MARKER_CLICK)
.subscribe(() => {
alert('clicked');
});
});