智慧农业绘制地图
guoshilong
2022-09-13 bcf8b7411f17e90935edf8175958211e06e8f57d
修改地图地址为https
5 files modified
20 ■■■■ changed files
src/components/clickMap.vue 4 ●●●● patch | view | raw | blame | history
src/components/draw.vue 2 ●●● patch | view | raw | blame | history
src/components/leafletDraw.vue 4 ●●●● patch | view | raw | blame | history
src/components/revampDraw.vue 4 ●●●● patch | view | raw | blame | history
src/components/小胖胖leafletDraw copy 3.vue 6 ●●●● patch | view | raw | blame | history
src/components/clickMap.vue
@@ -213,11 +213,11 @@
                doubleClickZoom: false, // 禁用双击放大
                attributionControl: false // 移除右下角leaflet标识
            })
            this.$L.tileLayer('http://t{s}.tianditu.gov.cn/DataServer?T=img_w&x={x}&y={y}&l={z}&tk=e9533f5acb2ac470b07f406a4d24b4f0', {
            this.$L.tileLayer('https://t{s}.tianditu.gov.cn/DataServer?T=img_w&x={x}&y={y}&l={z}&tk=e9533f5acb2ac470b07f406a4d24b4f0', {
                subdomains: [0, 1, 2, 3, 4, 5, 6, 7],
            }).addTo(this.map)
            this.$L.tileLayer('http://t{s}.tianditu.gov.cn/DataServer?T=cva_w&x={x}&y={y}&l={z}&tk=e9533f5acb2ac470b07f406a4d24b4f0', {
            this.$L.tileLayer('https://t{s}.tianditu.gov.cn/DataServer?T=cva_w&x={x}&y={y}&l={z}&tk=e9533f5acb2ac470b07f406a4d24b4f0', {
                subdomains: [0, 1, 2, 3, 4, 5, 6, 7],
            }).addTo(this.map)
        },
src/components/draw.vue
@@ -196,7 +196,7 @@
            flightArr: [31.34534554915163, 120.40351663678561],
            url: "https://mt3.google.cn/maps/vt?lyrs=s,h@189&gl=cn&x={x}&y={y}&z={z}&scale=1.2",
            attribution:
                '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors',
                '&copy; <a href="https://osm.org/copyright">OpenStreetMap</a> contributors',
            latlngArr: [], //绘制的地块的坐标
            area: 0, //多边形面积
            perimeter: 0, //周长
src/components/leafletDraw.vue
@@ -109,11 +109,11 @@
                doubleClickZoom: false, // 禁用双击放大
                attributionControl: false, // 移除右下角leaflet标识
            })
            this.$L.tileLayer('http://t{s}.tianditu.gov.cn/DataServer?T=img_w&x={x}&y={y}&l={z}&tk=e9533f5acb2ac470b07f406a4d24b4f0', {
            this.$L.tileLayer('https://t{s}.tianditu.gov.cn/DataServer?T=img_w&x={x}&y={y}&l={z}&tk=e9533f5acb2ac470b07f406a4d24b4f0', {
                subdomains: [0, 1, 2, 3, 4, 5, 6, 7],
            }).addTo(this.map)
            this.$L.tileLayer('http://t{s}.tianditu.gov.cn/DataServer?T=cva_w&x={x}&y={y}&l={z}&tk=e9533f5acb2ac470b07f406a4d24b4f0', {
            this.$L.tileLayer('https://t{s}.tianditu.gov.cn/DataServer?T=cva_w&x={x}&y={y}&l={z}&tk=e9533f5acb2ac470b07f406a4d24b4f0', {
                subdomains: [0, 1, 2, 3, 4, 5, 6, 7],
            }).addTo(this.map)
src/components/revampDraw.vue
@@ -223,11 +223,11 @@
                doubleClickZoom: false, // 禁用双击放大
                attributionControl: false // 移除右下角leaflet标识
            })
            this.$L.tileLayer('http://t{s}.tianditu.gov.cn/DataServer?T=img_w&x={x}&y={y}&l={z}&tk=e9533f5acb2ac470b07f406a4d24b4f0', {
            this.$L.tileLayer('https://t{s}.tianditu.gov.cn/DataServer?T=img_w&x={x}&y={y}&l={z}&tk=e9533f5acb2ac470b07f406a4d24b4f0', {
                subdomains: [0, 1, 2, 3, 4, 5, 6, 7],
            }).addTo(this.map)
            this.$L.tileLayer('http://t{s}.tianditu.gov.cn/DataServer?T=cva_w&x={x}&y={y}&l={z}&tk=e9533f5acb2ac470b07f406a4d24b4f0', {
            this.$L.tileLayer('https://t{s}.tianditu.gov.cn/DataServer?T=cva_w&x={x}&y={y}&l={z}&tk=e9533f5acb2ac470b07f406a4d24b4f0', {
                subdomains: [0, 1, 2, 3, 4, 5, 6, 7],
            }).addTo(this.map)
            //   this.map.removeLayer(name)  // 移除图层
src/components/小胖胖leafletDraw copy 3.vue
@@ -186,7 +186,7 @@
            flightArr: [31.34534554915163, 120.40351663678561],
            url: "https://mt3.google.cn/maps/vt?lyrs=s,h@189&gl=cn&x={x}&y={y}&z={z}&scale=1.2",
            attribution:
                '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors',
                '&copy; <a href="https://osm.org/copyright">OpenStreetMap</a> contributors',
            latlngArr: [], //绘制的地块的坐标
            area: 0, //多边形面积
            perimeter: 0, //周长
@@ -299,7 +299,7 @@
            this.$L.tileLayer('http://t{s}.tianditu.gov.cn/DataServer?T=img_w&x={x}&y={y}&l={z}&tk=e9533f5acb2ac470b07f406a4d24b4f0', {
            this.$L.tileLayer('https://t{s}.tianditu.gov.cn/DataServer?T=img_w&x={x}&y={y}&l={z}&tk=e9533f5acb2ac470b07f406a4d24b4f0', {
                subdomains: [0, 1, 2, 3, 4, 5, 6, 7],
            }).addTo(myMap)
@@ -307,7 +307,7 @@
            //     subdomains: [0, 1, 2, 3, 4, 5, 6, 7],
            // }).addTo(myMap)
            this.$L.tileLayer('http://t{s}.tianditu.gov.cn/DataServer?T=cva_w&x={x}&y={y}&l={z}&tk=e9533f5acb2ac470b07f406a4d24b4f0', {
            this.$L.tileLayer('https://t{s}.tianditu.gov.cn/DataServer?T=cva_w&x={x}&y={y}&l={z}&tk=e9533f5acb2ac470b07f406a4d24b4f0', {
                subdomains: [0, 1, 2, 3, 4, 5, 6, 7],
            }).addTo(myMap)