I set a marker on click on the map. I use MarkerWithLabel.
I use draggable marker.
If I drag a marker it works fine. But if I drag a label it works with click
event on the map.
How can I use labels and can drag a markers without click event?
In my example - when I drag a marker JS creates new marker.
http://jsfiddle.net/yV6xv/4139/
google.maps.event.addListener(map, 'click', function(event) {
addMarker(event.latLng)
});
function addMarker(latLng) {
var marker = new MarkerWithLabel({
position: latLng,
map: map,
draggable: true,
labelContent: "example",
labelAnchor: new google.maps.Point(30, 0),
labelClass: "labels", // the CSS class for the label
labelStyle: {opacity: 0.75}
});
google.maps.event.addListener(marker, 'dragend', function(e) {
alert(2);
})
}
Version: ###
Browser / Operating System:
[e.g. FF3 / MacOSX]
Additional comments:
[Enter any additional comments about the bug here.]
*********************************************************
Tip: Star this issue (next to title) to receive notifications of status
changes against this issue, also used as a gauge for how many people are
interested in seeing it resolved.
*********************************************************
Original issue reported on code.google.com by GulevN...@gmail.com on 27 Apr 2014 at 9:06
Original issue reported on code.google.com by
GulevN...@gmail.com
on 27 Apr 2014 at 9:06