智慧农业绘制地图
guoshilong
2022-09-03 2645d3fb16e38224538377c2ee17944297795915
根据农场定位
1 files modified
7 ■■■■■ changed files
src/components/leafletDraw.vue 7 ●●●●● patch | view | raw | blame | history
src/components/leafletDraw.vue
@@ -95,6 +95,13 @@
        },
        initDate () {
            var str = window.location.search.substring(1)
            var obj = this.getUrlParams(str)
            console.log(obj)
            if(obj.latitude&&obj.longitude){
                this.lat = obj.latitude
                this.lng = obj.longitude
            }
            this.map = this.$L.map("map", {
                center: [this.lat, this.lng], // 地图中心
                zoom: 14, //缩放比列