校园-江西科技师范大学-前端
src/components/map/index.vue
@@ -47,38 +47,35 @@
let campusLayers = [
    {
        key: 1,
        tileUrl: "https://fkxt.jxstnu.edu.cn/changjing/arcgis/rest/services/ksd1206/MapServer/tile/{z}/{y}/{x}",
        center: [10800, -4900],
        resolution: 4.233341800016934,
        origin: [-5123200.0, 10002100],
        projection: 'EPSG:4548',
        tileUrl: "https://fkxt.jxstnu.edu.cn/changjing/arcgis/rest/services/ksdhjzxq/MapServer/tile/{z}/{y}/{x}",
        center: [112.605918275550715, -0.0457081387615907618595],
        resolution: 0.00003807137609328448,
        origin: [-400.0, 399.9999999999998],
        resolutions: [
            16.933367200067735, 8.466683600033868, 4.233341800016934,
            2.116670900008467, 1.0583354500042335, 0.5291677250021167,
            0.26458386250105836
            0.00015228550437313792, 0.00007614275218656896, 0.00003807137609328448,
            0.00001903568804664224, 0.00000951784402332112, 0.00000475892201166056
        ],
        fullExtent: [
            -0.5, -11468.5, 18506.5,
            0.5,
            112.51303616638316, -0.103420786429659, 112.67880038471827,
            0.000004508906477476281
        ],
        polygonUrl: 'https://fkxt.jxstnu.edu.cn/changjing/lkarcgisapp'
    },
    {
        key: 2,
        tileUrl: "https://dev.jxpskj.com:8023/arcgis156/rest/services/cc/MapServer/tile/{z}/{y}/{x}",
        center: [115.79624983, 28.6416099],
        resolution: 0.000007138383017490841,
        origin: [-400.0, 400.0],
        projection: '4548',
        tileUrl: "https://fkxt.jxstnu.edu.cn/changjing/arcgis/rest/services/ksdflxq/MapServer/tile/{z}/{y}/{x}",
        center: [112.6202242373625, -0.0811745423945008147645],
        resolution: 0.00007614275218656896,
        origin: [-400.0, 399.9999999999998],
        resolutions: [
            0.000014276766034981682, 0.000007138383017490841, 0.00000475892201166056,
            0.00000237946100583028,
            0.00015228550437313792, 0.00007614275218656896, 0.00003807137609328448,
            0.00001903568804664224, 0.00000951784402332112, 0.00000475892201166056
        ],
        fullExtent: [
            115.76861782444642, 28.63584422760626, 115.82432471553928, 28.663308794331794,
            112.51302551881798, -0.16235359398493399, 112.72742295590702, 0.000004509195932360471
        ],
        polygonUrl: ''
        polygonUrl: 'https://fkxt.jxstnu.edu.cn/changjing/lkarcgisapp'
    }
]
@@ -168,9 +165,12 @@
                    this.$store.commit('SET_MONITORPOPUP', false)
                    this.$store.commit('SET_PANORAMAPOPUP', false)
                    this.$store.dispatch('delVisitedViews', this.$route)
                    this.$store.commit('SET_ARCNAVBARFLAG', false)
                    this.$store.commit('SET_SEARCHPOPUPFLAG', false)
                    this.$store.commit('SET_SEARCHPOPUPFLAG', false)
                    this.$router.push('/pcLayout/default')
                    this.$refs.leftNav.initialize(newData)
@@ -392,16 +392,16 @@
            if (campusLoadLayer) this.map2D.removeLayer(campusLoadLayer)
            let curCampus = campusLayers.find(item => item.key == campusKey)
            const tileGrid = new TilegridTileGrid({
            let tileGrid = new TilegridTileGrid({
                tileSize: 256,
                origin: curCampus.origin,
                extent: curCampus.fullExtent,
                resolutions: curCampus.resolutions,
            })
            // 瓦片数据源
            const tileArcGISXYZ = new XYZ({
            let tileArcGISXYZ = new XYZ({
                tileGrid: tileGrid,
                // projection: curCampus.projection,
                projection: "EPSG:4326",
                url: curCampus.tileUrl,
            })
@@ -431,7 +431,7 @@
                // 初始化中心点坐标
                center: curCampus.center,
                resolution: curCampus.resolution,
                // projection: curCampus.projection,
                projection: "EPSG:4326",
                extent: curCampus.fullExtent,
            }))
        }