gpt4 book ai didi

google-maps-api-3 - Google Maps API 3-键入错误: a is undefined

转载 作者:行者123 更新时间:2023-12-04 04:53:24 25 4
gpt4 key购买 nike

我正在尝试从http://debug-gotfed.admin.zope.net/bataviaeats/at/dev_remote_content的json文件动态加载地址解析

我收到“类型错误:a未定义”。我想念什么?

<script type="text/javascript">

// Global

var infowindow;
var markers_img = 'http://gotfed.in/!/assets/global_images/got-fed-in-marker.png';
var infoCloseIcon = 'images/close.png';
var infoCloseMargin = '4px 4px 2px 2px';

function initialize() {
var mapOptions = {
center: new google.maps.LatLng(58, 16),
scrollwheel: false,
mapTypeControl: false,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
map = new google.maps.Map(document.getElementById("map-canvas"), mapOptions);

$.each(locations, function(i, data) {
console.log(data.geocode);
var position = new google.maps.LatLng(data.geocode);
var marker = new google.maps.Marker({
position: position,
map: map,
icon: markers_img
});
console.log(marker);
// marker.setMap(map);
});
}
google.maps.event.addDomListener(window, 'load', initialize);

</script>

最佳答案

您要么是在加载页面时打开了Firebug控制台,要么是firefox扩展程序之一阻止了下载,从而使浏览器无法从Google获取完整的脚本。

解决方案:如果不是这种情况,请打开firebug控制台,然后尝试分别禁用扩展,以免发生冲突。

关于google-maps-api-3 - Google Maps API 3-键入错误: a is undefined,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19704609/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com