通过点击工作我的代码来检索lat,它工作正常.想知道是否可以在单个事件监听器中组合"click"和"dragend",如果没有.会不会感到有什么选择.
这就是我一直在努力的方面.
google.maps.event.addListener(map,'click', function(event) {
document.getElementById("latbox").value = event.latLng.lat();
document.getElementById("lngbox").value = event.latLng.lng();
addMarker(event.latLng);
});
}
function addMarker(location) {
if (!marker) {
marker = new google.maps.Marker({
position: location,
map: map,
draggable:true,
animation: google.maps.Animation.DROP
});
}
// Otherwise, simply update its location on the map.
else { marker.setPosition(location); }
}
Run Code Online (Sandbox Code Playgroud)
我试过这样做google.maps.event.addListener(map,'click','dragend', function(event)但无济于事.如果有人有想法修改它marker.setPosition(location);有animation: google.maps.Animation.DROP..提前致谢.
嗨,有人可以在我的条件声明中帮助我做错了.
if(isset($_GET['input'] or $_GET['input2'] or $_GET['input3']))
{
$release=$_GET['input'].$_GET['input2'].$_GET['input3'];
echo $release;
}
Run Code Online (Sandbox Code Playgroud)
编辑:错误是 syntax error, unexpected T_LOGICAL_OR, expecting ',' or ')'