Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.
function Add_Point_Enable()
{
//Allows user to add a new point to the map by clicking on the map
alert('Move the cursor to the desired location');
document.getElementById("datatable").style.display = "";
document.getElementById("Cancel").disabled=false;
map.getDragObject().setDraggableCursor("crosshair");
GEvent.addListener(map, "click", function(marker, point)
{
document.getElementById('currentid').value = "";
ChangeButtons();
if (marker)
{
}
else
{
var confirmpoint = confirm("Do you want to add a signal to this location?");
if (confirmpoint)
{
map.clearOverlays();
GetData();
map.addOverlay(new GMarker(point));
ClearData();
document.mapform.newlat.value = point.y;
document.mapform.newlon.value = point.x;
document.getElementById("Save").disabled=false;
document.getElementById("Add").disabled=true;
//document.getElementById("storydisplay").style.display = "none";
}
}
} // close of function(marker,point)
); //close of listener
}
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Can you post a link to a page where this code is being used?