首页 / 浏览问题 / 三维GIS / 问题详情
vue3+superMap3D加载温州天地图wmts失败
7EXP 2025年09月17日

https://tdt.wzmap.gov.cn/wzmap?tdtkey=fc73e380577c097275b56171d60e5675&serviceCode=c25071b97515fc66d7d75e2350eea274
 

const labels = [], scaleDenominators = [];

    for (let i = 0; i <= 20; i++) {

        labels.push("" + i);

        scaleDenominators.push(5.590822744575967E8 / Math.pow(2, i));

    }
 

const imageryProvider = new SuperMap3D.WebMapTileServiceImageryProvider({

            url: child.expand.mapUrl,

            layer: 'CGCS2000_2024yx', // 从配置中获取图层名称

            style: 'default',

            format: 'image/png',

            tileMatrixSetID: 'Custom_CGCS2000_2024yx', // 从配置中获取瓦片矩阵集ID

            rectangle: SuperMap3D.Rectangle.fromDegrees(118.12500556109484, 25.312498793347345, 123.75000566602114, 30.937498898273667),

            tilingScheme: new SuperMap3D.GeographicTilingScheme({

                numberOfLevelZeroTilesX: 1,

                numberOfLevelZeroTilesY: 1,

                ellipsoid: SuperMap3D.Ellipsoid.CGCS2000,

                scaleDenominators: scaleDenominators,

                customDPI: new SuperMap3D.Cartesian2(90.7142857142857, 90.7142857142857),

            }), // 使用平面坐标系的切片方案

            tileMatrixLabels: labels,

            maximumLevel: 20,

            minimumLevel: 0

        });

 

imageryProvider._name = child.layerEn;

        const wmts = vm._imageryLayers.addImageryProvider(imageryProvider);

        vm._viewer.flyTo(wmts)

        let layer = vm._imageryLayers._layers.find(item => {

            return item._imageryProvider._name && item._imageryProvider._name == child.layerEn;

        });

        // 设置图层可见性

        layer.show = !!child.expand.visible;

1个回答

出了一个新报错
 

An error occurred while rendering. Rendering has stopped.

TypeError: Cannot read properties of undefined (reading 'west') TypeError: Cannot read properties of undefined (reading 'west') at h$1f._createTileImagerySkeletons (http://localhost:8091/lib/SuperMap3D/SuperMap3D.js:1:5382629) at fe$x (http://localhost:8091/lib/SuperMap3D/SuperMap3D.js:1:5950503) at c$14.initialize (http://localhost:8091/lib/SuperMap3D/SuperMap3D.js:1:5958587) at c$14.processStateMachine (http://localhost:8091/lib/SuperMap3D/SuperMap3D.js:1:5958678) at w$T.loadTile (http://localhost:8091/lib/SuperMap3D/SuperMap3D.js:1:6021902) at X$a (http://localhost:8091/lib/SuperMap3D/SuperMap3D.js:1:9187901) at Oe$5 (http://localhost:8091/lib/SuperMap3D/SuperMap3D.js:1:9187628) at f$l.endFrame (http://localhost:8091/lib/SuperMap3D/SuperMap3D.js:1:9178175) at d$o.endFrame (http://localhost:8091/lib/SuperMap3D/SuperMap3D.js:1:9217616) at Li (http://localhost:8091/lib/SuperMap3D/SuperMap3D.js:1:10333599)

7EXP 2025年09月17日

更新了一下SuperMap3D版本,好像就行了devil

...