level 2
黄文杰947
楼主
无报错为啥不显示地图啊,这是代码<!DOCTYPE html><html lang="en"><head><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/ol.css" type="text/css"><script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/ol.js"></script> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title></head><body> <div id="map" style="width: 100vw; height: 100vh;"></div> <script> const map = new ol.Map({ target: 'map', layers: [lbk] new ol.layer.Tile({ source: new ol.source.OSM() }) [rbk], view: new ol.View({ center: ol.proj.fromLonLat([lbk]0, 0[rbk]), zoom: 2 }) }); </script></body></html>



2025年04月11日 17点04分
1


