怎么会,我正在努力研究如何改变下面的代码来处理“Heading_change”而不是“Click”。有没有人管理过这个?即使没有鼠标点击,它仍然是一个(事件)吗?
google.maps.event.addListener(map, 'click', addLatLng);
/**
* Handles click (or other) events on a map, and adds a new point to the Polyline.
* @param {MouseEvent} mouseEvent
*/
function addLatLng(event) {
var path = flightPath.getPath();
// Because path is an MVCArray, we can simply append a new coordinate
// and it will automatically appear
path.push(event.latLng);
// Add a new marker at the new plotted point on the polyline.
var marker = new google.maps.Marker({
position: event.latLng,
title: '#' + path.getLength(),
map: map
});alert("Done");
}