Tôi đã tìm kiếm sự cố này trên toàn bộ web và không ai trong số họ dường như cho tôi bất kỳ giải pháp nào. Tôi có một kịch bản đơn giản để chỉ hiển thị bản đồ của Nam Phi.API Google Maps: LoạiError: a is undefined
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge, chrome=1" />
<title>Map Test</title>
<script language="javascript" src="https://maps.googleapis.com/maps/api/js?sensor=true"></script>
<style>
#map-canvas {
height: 300px;
width: 980px;
margin: 0;
padding: 0;
margin-top: 10px;
}
</style>
</head>
<body>
<div id="map-canvas" class="map_canvas"></div>
<script type="text/javascript">
function initialize()
{
var mapOptions = {
center: new google.maps.LatLng(-29.09958,26.18434),
zoom: 5,
mapTypeControlOptions: {
position: google.maps.ControlPosition.TOP_LEFT
}
};
map = new google.maps.Map(document.getElementById('map-canvas'),mapOptions);
}
google.maps.event.addDomListener(window, 'load', initialize);
</script>
</body>
</html>
Nhưng tôi tiếp tục nhận được cùng một lỗi lặp đi lặp lại. Tôi thậm chí đã thử trên một máy chủ khác.
Xin giúp
Tôi không thể sao chép vấn đề này bằng Chrome 44 ~ 45. Tôi thậm chí đã thử Firefox và không có lỗi. –
@KimHonoridez, sự cố dường như không ảnh hưởng đến Chrome. Lỗi này liên tục xảy ra trong Firefox 41.0.1. –