gpt4 book ai didi

javascript - 谷歌地图灰色 map

转载 作者:太空宇宙 更新时间:2023-11-04 14:04:49 29 4
gpt4 key购买 nike

所以,我这里有一些类似于灰色 map 的东西,只是在这里我看到了所有的按钮。除了 map 图 block 外,一切看起来都 100% 正常。它们都是灰色的!所以会发生什么,这很奇怪,它以 8 倍率加载 nicley,然后放大到最大,然后 Gray Tiles me。现在是代码:

 <style>

html, body, #map-canvas {
height: 100%;
margin: 0px;
padding: 0px;
width: 100%;
}


</style>
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBN5n7Q_LBTusrg4ae_vFtDWq22SZg5orU&sensor=false"></script>
<script>
var map;
function initialize() {
var mapOptions = {
zoom: 8,
center: new google.maps.LatLng(-34.397, 150.644),
mapTypeId: google.maps.MapTypeId.ROADMAP
};
map = new google.maps.Map(document.getElementById('map-canvas'),
mapOptions);
var kmlLayer = new google.maps.KmlLayer({
url: 'http://pasteht.ml/pr7Xm',
suppressInfoWindows: false,
map: map
});
}

google.maps.event.addDomListener(window, 'load', initialize);

</script>

最佳答案

<coordinates/>地标无效。

在 KML 中,顺序必须是 longitude, latitude (使用相反的顺序,纬度将设置为 -122.419416 ,这是纬度的无效值...有效范围约为 -85 to 85 )

关于javascript - 谷歌地图灰色 map ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21210533/

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