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

Loading…
Cancel
Save