<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script src="dist/leaflet/include-leaflet.js"></script>
<style>
div {
margin: 0 auto;
}
</style>
</head>
<body>
<div id="map" style="width: 1500px;height: 700px;">
</div>
<script>
var url = "http://10.41.76.219:8090/iserver/services/map-china400/rest/maps/China";
var map = L.map('map', {
center: [0, 0],
zoom: 13
});
new TiledMapLayer(url).addTo(map);
</script>
</body>
</html>
以上是我的代码
这个是引用地址吗 http://localhost:8090/iserver/services/map-china400/rest/maps/China
结果就是有地图窗口,但是是灰色的,检查有报错。我不知道是不是引用的库有问题,因为include-leaflet.js那个文件里面的路径改过了