我正在尝试将 google maps API 从 v2 迁移到 v3,但我一直收到此错误:Google Maps API 服务器拒绝了您的请求。请求中指定的“sensor”参数必须设置为“true”或“false”。
这是我正在使用的教程:https://developers.google.com/maps/documentation/javascript/tutorial
在 javascript 中,我将 src 更改为
<script type="text/javascript"
src="http://maps.googleapis.com/maps/api/js?key=AIzaSyDzGdafsdfdfgoO4cHbfRGL8W23dgfafJKnA&sensor=TRUE">
</script>
但我不断收到以下错误: Google Maps API 服务器拒绝了您的请求。请求中指定的“sensor”参数必须设置为“true”或“false”。
错误是什么意思,我该如何解决?
最佳答案
使用:sensor=true
而不是 sensor=TRUE
区分大小写。
关于javascript - 为什么我在尝试加载谷歌地图时不断收到错误消息?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9959083/