|
|
@ -1,3 +1,4 @@ |
|
|
|
// import { getLayerStyle } from '@/api/aiSupervision/layerConfigApi.js';
|
|
|
|
const createXyzLayer = (data) => |
|
|
|
new sycim.XyzLayer(data.id, { |
|
|
|
...data, |
|
|
@ -55,19 +56,23 @@ const layerActions = { |
|
|
|
} |
|
|
|
}), |
|
|
|
'030300': async (data) => { |
|
|
|
const options = {}; |
|
|
|
if (data.relationStyleId) { |
|
|
|
const res = await getLayerStyle(data.relationStyleId); |
|
|
|
options.styleConfig = res.information ? JSON.parse(res.information) : ''; |
|
|
|
} |
|
|
|
const options = { |
|
|
|
version: '2.0.0', |
|
|
|
TYPENAMES: data.layerTable, |
|
|
|
outputFormat: 'json' |
|
|
|
}; |
|
|
|
// if (data.relationStyleId) {
|
|
|
|
// const res = await getLayerStyle(data.relationStyleId);
|
|
|
|
// options.styleConfig = res.information ? JSON.parse(res.information) : '';
|
|
|
|
// }
|
|
|
|
return new sycim.WfsLayer(data.id, data.url, data.layerTable, options); |
|
|
|
}, |
|
|
|
'030400': async (data) => { |
|
|
|
const options = {}; |
|
|
|
if (data.relationStyleId) { |
|
|
|
const res = await getLayerStyle(data.relationStyleId); |
|
|
|
options.styleConfig = res.information ? JSON.parse(res.information) : ''; |
|
|
|
} |
|
|
|
// if (data.relationStyleId) {
|
|
|
|
// const res = await getLayerStyle(data.relationStyleId);
|
|
|
|
// options.styleConfig = res.information ? JSON.parse(res.information) : '';
|
|
|
|
// }
|
|
|
|
return new sycim.GeoJsonLayer(data.id, data.url, options); |
|
|
|
}, |
|
|
|
'040003': (data) => |
|
|
|