0
안녕하세요, 1.ADD, 2.EDIT, 3.DELETE ..... 및 id = comp_map ...이라는 맵이 3 개 있습니다.특정 조건을 클릭 할 때만 기능을 활성화하는 방법
function addComp() {
$("#comp_map").click(function() {
if (event.type !== 'mousemove') {
var containerPoint = comp_map.mouseEventToContainerPoint(event),
layerPoint = comp_map.containerPointToLayerPoint(containerPoint),
latlng = comp_map.layerPointToLatLng(layerPoint)
alert("Marker Location: "+latlng);
}
});
}
function editComp() {
// disable the map click
}
function delComp() {
// disable the map click
}
.... 내 질문을 열기 거리지도를 사용하여 내가 $("#comp_map").click
이 추가 버튼을 클릭 한 경우에만 작동 할 것입니다 ...하지만 편집과 같은 다른 버튼이 클릭 할 삭제할 때이 기능이 작동하지합니다 .. . 이것이 올바른 방법입니다. 또는 제 접근법이 잘못되어 있으면 제게 ... 고맙습니다. ...!
지도는 가장 최근에 클릭되었거나 활성화 된 버튼에 따라 다른 기능을 호출해야합니까? 또는 나는 당신의 의도를 오해합니까? –
네, 맞습니다 ..... – troy