I would like to show an info window when I'm moving a vertex on an editable polyline. This info will show the distance and heading to the prior vertex on the polyline. When I drop the vertex, the info window must be closed. The problem is polyline hasn't a drag event over vertex. I'll try with polyline's mousemove but It is fired after move has finished. In the next code, I show an example what I said. I have a polyline (flightPath). If I click on the last vertex I will like to move a marker at the same time. But It doesn't work. The marker is moved after movement is finished.
google.maps.event.addListener(flightPath, 'mousemove', function (event) {
if (typeof event.vertex === "undefined") {
moveline = 0
}
else {
if (event.vertex == (flightPath.getPath().getLength()-1)) {
var path = flightPath.getPath();
marker.setPosition(path.getAt(event.vertex));
}
}
});
Some suggestion?
Note: My polyline is editable.
Thanks
You could manage a drag end event on the marker and change de latLng of the vertex:
I'm sorry for my bad english but i hope it helps.