首页 / 浏览问题 / WebGIS / 问题详情
WebGIS开发萌新 运行代码china地图未显示
1EXP 2021年08月16日

使用产品:supermap-iserver-10.1.2a-win64   操作系统:Win10

详细步骤:发布一个地图服务之后进行创建工程,写完代码运行之后,网页是空白的

<!DOCTYPE html>
<html>
    <head>
        <meta hrrp-equiv="Content-Type" content="text/html" charsest="utf-8">
        <title>地图加载</title>
        <script src="dist/leaflet/include-leaflet.jc"> </script>
    </head>
    <body>
        <div id="map" style="width: 1500px;height:700px;"></div>
        <script type="text/javascript">
                var map,
                url="http://localhost:8090/iserver/services/map-China/rest/maps/China"
                map=L.map("map",{
                    center:[0,0],
                    maxZoom:18,
                    zoom:2,
                    crs:L.CRS.EPSG3857,
                });
                L.supermap.tiledMapLayer(url,{noWrap:true}).addTo(map);
        
        </script>
    </body>
</html>

1个回答

您好,看您上面的代码发现引入的js文件有误,确认一下引入文件,可参照https://iclient.supermap.io/examples/leaflet/editor.html#01_tiledMapLayer3857

1,000EXP 2021年08月16日
...