首页 / 浏览问题 / 云GIS / 问题详情
镶嵌数据集制成的二维地图发布在iServer上后如何在iClient上显示
250EXP 2021年04月28日
如题。使用镶嵌数据集制作了地图后,发布在了iServer上。

iDesktop中配合地图显示正常,发布在iServer上后直接打开对应地图也可以正常显示

但在iClient for Classic中显示时,该图层无法显示。

请问应该如何引用该图层

1个回答

你好,你发布为地图服务以后,把url地址复制粘贴到示例代码(https://iclient.supermap.io/examples/classic/editor.html#map_4326Map)里面,把相关参数填写成你自己的即可。

3,740EXP 2021年04月28日
您好。这个方法之前已经试过了。

引用的是发布在本地iServer上的地图服务

 url2 = "http://localhost:8090/iserver/services/map-省略/rest/maps/省略%40Mosaic_test";

layerMosaic = new SuperMap.Layer.TiledDynamicRESTLayer("mosaic", url2, {
            transparent: true,
            cacheEnabled: true
        });

但是新建时会报错

VM1441:1 Uncaught TypeError: Cannot read property 'isInTheSameDomain' of undefined
    at new initialize (eval at <anonymous> (SuperMap-8.1.1-19426.js:3), <anonymous>:1:135976)
    at initialize.addLayer (testMap.js:29)
    at initialize.triggerEvent (eval at <anonymous> (SuperMap-8.1.1-19426.js:3), <anonymous>:1:23554)
    at initialize.getStatusSucceed (eval at <anonymous> (SuperMap-8.1.1-19426.js:3), <anonymous>:1:139112)
    at initialize.triggerEvent (eval at <anonymous> (SuperMap-8.1.1-19426.js:3), <anonymous>:1:23554)
    at initialize.getMapStatusCompleted (eval at <anonymous> (SuperMap-8.1.1-19426.js:3), <anonymous>:1:555283)
    at initialize.getUrlCompleted (eval at <anonymous> (SuperMap-8.1.1-19426.js:3), <anonymous>:1:535017)
    at eval (eval at <anonymous> (SuperMap-8.1.1-19426.js:3), <anonymous>:1:1792)
    at Object.m.supermap_callbacks.<computed> [as 44801319858108040] (eval at <anonymous> (SuperMap-8.1.1-19426.js:1), <anonymous>:1:26309)
    at World.jsonp?callback=SuperMap.Util.RequestJSONP.supermap_callbacks[44801319858108040]&sectionCount=1&sectionIndex=0&jsonpUserID=1619595267797:1
省略的部分是地图的名称以及数据集的名称

你在iserver发布服务以后,可以直接预览吗?

您好。可以的
方便把数据发给我测试一下吗?
这个数据不方便分享。这个镶嵌数据集使用的坐标系是Japan Plate Carree JGD2000 Zone VIII,EPSG是2450。

现在想要将这个数据集的数据显示在3857的地图上。

请问有无将镶嵌数据集图层显示在地图上的范例
...