0
我有以下的onClick功能的時候只顯示1個標記...在弗朗的onClick
GEvent.addListener(map, "click", function(overlay, latLng)
{
if (latLng) {
marker = new GMarker(latLng, {draggable:true});
marker.openInfoWindowHtml(mes);
}
// display the lat/lng in your form's lat/lng fields
document.getElementById("lat").value = latLng.lat();
document.getElementById("lng").value = latLng.lng();
});
基本上我想使它所以只有一個標記顯示在最近的點擊。我一直在看這個問題Googlemaps - removing previous marker,但不能真正弄清楚我將如何應用到我的代碼。有人能幫助我嗎?
謝謝。