首页 / 浏览问题 / WebGIS / 问题详情
超图FAQ:【iClient】Leaflet加载rest地图服务,如何访问iServer加载的缓存
64,468EXP 2024年01月02日
【iClient】Leaflet加载rest地图服务,如何访问iServer加载的缓存

1个回答

【解决办法】Leaflet加载地图时,需要设置分辨率和范围和iServer中的地图服务一致,例如: map = L.map('map', { center: [0, 0], maxZoom: 18, zoom: 2, crs: new L.supermap.Proj.CRS("EPSG:4326", { origin: [-180.0, 90.0], resolutions: [1.4062499999999996,0.7041106029214796,0.3520553014607398,0.1760276507303699,0.08801382536518496,0.04400691268259248,0.02200345634129624,0.011001728170648106,0.005500864085324065,0.002750432042662044], bounds: L.bounds([-180.0, -90.0], [180.0, 90.0]) }) }); new L.supermap.TiledMapLayer("https://iserver.supermap.io/iserver/services/map-world/rest/maps/World").addTo(map);
64,468EXP 2024年01月02日
热门文章
关注我们
...