Browse Source

fix: 调整超图rest服务的对接模式

sy-water-data-board-ui
chenhaojie 1 year ago
parent
commit
57c1405dfa
  1. 2
      public/lib/sycim/sycim.min.css
  2. 1000
      public/lib/sycim/sycim.min.js
  3. 24
      src/views/aiSupervision/waterSetting/runScene/layerTree/index.js

2
public/lib/sycim/sycim.min.css

File diff suppressed because one or more lines are too long

1000
public/lib/sycim/sycim.min.js

File diff suppressed because one or more lines are too long

24
src/views/aiSupervision/waterSetting/runScene/layerTree/index.js

@ -10,16 +10,17 @@ const layerTypeEnum = {
'012000': 'PRIMITIVE', '012000': 'PRIMITIVE',
'013000': 'TILESET', '013000': 'TILESET',
'014000': 'XYZ', '014000': 'XYZ',
'021102': 'ARCGIS_DYNAMIC',
'030100': 'WMTS', '030100': 'WMTS',
'030200': 'WMS', '030200': 'WMS',
'030300': 'WFS', '030300': 'WFS',
'030400': 'GEOJSON', '030400': 'GEOJSON',
'040003': 'WFS',
'050100': 'TDTWMTS', '050100': 'TDTWMTS',
'060100': 'XYZ', '060100': 'XYZ',
'070100': 'BINGMAP', '070100': 'BINGMAP',
'040003': 'WFS', '080100': 'S3M',
'021102': 'ARCGIS_DYNAMIC', '081100': 'SUPERMAP_REST'
'080100': 'S3M'
}; };
// 图层响应动作 // 图层响应动作
@ -94,6 +95,10 @@ const layerActions = {
'070100': (data) => '070100': (data) =>
new sycim.BingMapLayer(data.id, { new sycim.BingMapLayer(data.id, {
...data ...data
}),
'081100': (data) =>
new sycim.SuperMapRestLayer(data.id, {
...data
}) })
}; };
@ -175,7 +180,7 @@ const zoomToLayerActions = {
'060100': zoomToLayerByType, '060100': zoomToLayerByType,
'070100': zoomToLayerByType, '070100': zoomToLayerByType,
'080100': zoomToS3MLayer, '080100': zoomToS3MLayer,
'081100': zoomToSuperMapImageryLayer '081100': zoomToLayerByType
}; };
// 添加图层 // 添加图层
@ -195,15 +200,6 @@ export async function addLayer(layerData) {
}); });
} }
return; return;
} else if (layerType === '081100') {
// 超图的影像图层
if (supermapLayer[id]) {
supermapLayer?.[id]?.show();
} else {
const layer = new SuperMapImageryLayer(url, { viewer: window.viewer });
supermapLayer[id] = layer;
}
return;
} }
if (!layerType || !(action = layerActions[layerType])) return; if (!layerType || !(action = layerActions[layerType])) return;
const layer = await action(layerData); const layer = await action(layerData);
@ -231,8 +227,6 @@ export function removeLayer(layerData) {
if (supermapLayer[id]) { if (supermapLayer[id]) {
supermapLayer[id].show = false; supermapLayer[id].show = false;
} }
} else if (layerType === '081100') {
supermapLayer?.[id]?.hide();
} else { } else {
window.viewer.removeLayer({ window.viewer.removeLayer({
id, id,

Loading…
Cancel
Save