我今天已升级到Google Map API v3并开始出现mootool-core.js错误。请查看我的网站和代码如下。任何帮助将不胜感激。
<script>
function initMap() {
var geocoder = new google.maps.Geocoder();
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 11,
});
geocodeAddress(geocoder, map);
}
function geocodeAddress(geocoder, resultsMap) {
var address = document.getElementById('address').value;
geocoder.geocode({'address': address}, function (results, status) {
if (status === google.maps.GeocoderStatus.OK) {
resultsMap.setCenter(results[0].geometry.location);
var marker = new google.maps.Marker({
map: resultsMap,
position: results[0].geometry.location
});
} else {
alert('Address not found: ' + status);
}
});
}
</script>