<body> <div id="map"></div> <script> var map=new ol.Map({ target:‘map‘, layer:[], view:new ol.View({ center:[0,0], zoom:2 }) }); var tileLayer=new ol.layer.Tile({source:new ol.source.OSM()}); map.addLayer(tileLayer); </script></body>
是可以显示地图的以下两种都显示不出来,没有道理的啊
<body> <div id="map"></div> <script> var map=new ol.Map({ target:‘map‘, layer:[new ol.layer.Tile({source:new ol.source.OSM()})], view:new ol.View({ center:[0,0], zoom:2 }) }); </script></body>
感觉可神奇了
时间: 2024-12-29 03:31:35