首页 / 浏览问题 / WebGIS / 问题详情
网页端不显示地图
2EXP 2022年04月22日

网页端不显示地图

1个回答

您好,看您引用应该是想用leaflet加载iserver的rest地图服务是吧?

看您的报错和代码可以考虑下,js文件引入的问题没成功,以及服务地址是否到地图名这一级。

建议您参考该demo根据您电脑上具体iclient情况,引全引对,

demo:http://support.supermap.com.cn:8090/iserver/iClient/forJavaScript/examples/leaflet/editor.html#01_tiledMapLayer4326

也阔以参考一下leaflet准备配置:http://support.supermap.com.cn:8090/iserver/iClient/forJavaScript/web/introduction/leafletDevelop.html#Ready

希望可以帮助到您。

9,618EXP 2022年04月22日
Could not load content for file:///E:/Supermap/Gettingstarnd/libs/leaflet/src/map/Map.js (System error: net::ERR_FILE_NOT_FOUND)

还是无法显示,报错是找不到这个文件

你这边如果确定引用没有问题的话,下载当前最新包看一下。

http://support.supermap.com.cn/DownloadCenter/DownloadPage.aspx?id=1886

示例:\examples\leaflet文件夹中任意html均可直接运行。

...