智慧园区前端大屏
linwe
2024-11-25 d47bdf72ffca6d8692413c53fed83e9c22881e23
src/pages/layout/components/scomponents/layersControl.vue
@@ -2,7 +2,7 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2024-10-31 10:47:29
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2024-11-23 17:09:04
 * @LastEditTime: 2024-11-25 15:32:31
 * @FilePath: \bigScreen\src\pages\layout\components\scomponents\layersControl.vue
 * @Description:
 *
@@ -124,7 +124,28 @@
      {
        url: VITE_APP_BASE + 'newMx/mx/tile_05/tileset.json',
        label: 'tile_05'
      }
      },
      // {
      //   url: 'http://localhost:9003/model/ZOebpNa0/tileset.json',
      //   label: 'tile_01'
      // },
      // {
      //   url: 'http://localhost:9003/model/QKYdBZ0b/tileset.json',
      //   label: 'tile_02'
      // },
      // {
      //   url: 'http://localhost:9003/model/QrimOmf3/tileset.json',
      //   label: 'tile_03'
      // },
      // {
      //   url: 'http://localhost:9003/model/S7E9aUgj/tileset.json',
      //   label: 'tile_04'
      // },
      // {
      //   url: 'http://localhost:9003/model/WYUq33vu/tileset.json',
      //   label: 'tile_05'
      // },
    ],
    layerName: 'hgyq'
  },
@@ -814,16 +835,16 @@
          item.method(item.params).then(res => {
            let data = res.data.data.records
            data.forEach(i => {
              let stl = '';
              let stl = ''
              try {
                let geom = JSON.parse(i.geom);
                let geom = JSON.parse(i.geom)
                if (geom && geom.coordinates && geom.coordinates[0]) {
                  stl = geom.coordinates[0][0].map(d => d[0] + ',' + d[1]).join(';');
                  stl = geom.coordinates[0][0].map(d => d[0] + ',' + d[1]).join(';')
                } else {
                  console.error('Invalid geom structure');
                  console.error('Invalid geom structure')
                }
              } catch (error) {
                console.error('Failed to parse geom:', error);
                console.error('Failed to parse geom:', error)
              }
              let polygon = new DC.Polygon(stl)
              polygon.setStyle({