gpt4 book ai didi

javascript - 仅引用错误 : google is not defined, (mozilla)

转载 作者:行者123 更新时间:2023-12-02 14:26:46 25 4
gpt4 key购买 nike

我尝试使用带有自定义标记的谷歌地图 API,在 Chrome 上工作正常,但在其他浏览器上有错误。

第一个错误:

ReferenceError: google is not defined

第二个错误:

InvalidValueError: mapInitialize is not a function

JSfiddle 示例:example

测试站点:testsite

我做错了什么?请帮忙!

最佳答案

mapInitialize 函数末尾添加此代码:

var mapCenter = new google.maps.LatLng(56.946528, 24.118665);
map.setCenter(mapCenter);

Image result

关于javascript - 仅引用错误 : google is not defined, (mozilla),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38178370/

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