guanqb
2022-11-22 75c24c7a60d95b3b52726f2425dff977a7ddfcea
src/components/map/index.vue
@@ -315,6 +315,10 @@
            that.removeMxTileset(params.titlesetName, params.incident)
        })
        this.$EventBus.$on('flytoLayer', (params) => {
            that.flytoLayer(params.layerName, params.duration)
        })
    },
    methods: {
@@ -581,6 +585,15 @@
        // sdTilesetLayer
        /**
        * 飞到指定图层
        * @param {*} layerName 图层名称
        * @param {*} duration 时间
        */
        flytoLayer (layerName, duration = 3) {
            global.viewer.flyTo(layersObjcect[layerName], duration)
        },
        /**
         * 添加模型
         * @param {*} titlesetName 图层名称
         * @param {*} titlesetUrl 模型地址