Kaynağa Gözat

辉南林业

Wubaozaizhong 2 yıl önce
ebeveyn
işleme
f3d8901b0c

+ 152 - 2
mybusiness/src/main/resources/templates/business/visualization/map.html

@@ -190,6 +190,132 @@
         func(true);
     }
 
+    /**
+     * 添加秸秆焚烧mark
+     * */
+    function jgfsMarker(option,func){
+        var iconUrl = '[[@{/visualization/images/bug.gif}]]';
+        if(option.status == 'event_status_1'){
+            iconUrl = '[[@{/visualization/images/bug-h.gif}]]';
+        }else if(option.status == 'event_status_4'){
+            iconUrl = '[[@{/visualization/images/bug-ok.gif}]]';
+        }
+        var icon = L.icon({
+            iconUrl: iconUrl,
+            iconSize: [65, 67],
+            iconAnchor: [33, 30]
+        });
+        var markName="jgfsMarker"+option.id;
+        markName = L.marker(
+            [option.latitude , option.longitude],
+            {icon: icon}
+        );
+        resultLayer.addLayer(markName);
+        markName.on("mousemove", function () {
+            pop = L.popup({className:'div_tittle'})
+                .setLatLng([option.latitude,option.longitude])
+                .setContent(
+                    "<span class='bch_tit'>秸秆焚烧</span>"+
+                    "<h4>"+option.title+"</h4>"+
+                    "<p>"+option.content+"</p>"
+                ).openOn(map);
+        });
+        markName.on("mouseout", function () {
+            map.closePopup(pop);
+        });
+
+        markName.on("click", function(){
+            var video = $('#fireaudio',parent.document);
+            video[0].pause();
+            detailsDia(option.id,option.reserveplanType);
+        });
+        func(true);
+    }
+
+    /**
+     * 添加防汛防控mark
+     * */
+    function fxfkMarker(option,func){
+        var iconUrl = '[[@{/visualization/images/bug.gif}]]';
+        if(option.status == 'event_status_1'){
+            iconUrl = '[[@{/visualization/images/bug-h.gif}]]';
+        }else if(option.status == 'event_status_4'){
+            iconUrl = '[[@{/visualization/images/bug-ok.gif}]]';
+        }
+        var icon = L.icon({
+            iconUrl: iconUrl,
+            iconSize: [65, 67],
+            iconAnchor: [33, 30]
+        });
+        var markName="fxfkMarker"+option.id;
+        markName = L.marker(
+            [option.latitude , option.longitude],
+            {icon: icon}
+        );
+        resultLayer.addLayer(markName);
+        markName.on("mousemove", function () {
+            pop = L.popup({className:'div_tittle'})
+                .setLatLng([option.latitude,option.longitude])
+                .setContent(
+                    "<span class='bch_tit'>防汛防控</span>"+
+                    "<h4>"+option.title+"</h4>"+
+                    "<p>"+option.content+"</p>"
+                ).openOn(map);
+        });
+        markName.on("mouseout", function () {
+            map.closePopup(pop);
+        });
+
+        markName.on("click", function(){
+            var video = $('#fireaudio',parent.document);
+            video[0].pause();
+            detailsDia(option.id,option.reserveplanType);
+        });
+        func(true);
+    }
+
+    /**
+     * 添加野生动物mark
+     * */
+    function ysdwMarker(option,func){
+        var iconUrl = '[[@{/visualization/images/bug.gif}]]';
+        if(option.status == 'event_status_1'){
+            iconUrl = '[[@{/visualization/images/bug-h.gif}]]';
+        }else if(option.status == 'event_status_4'){
+            iconUrl = '[[@{/visualization/images/bug-ok.gif}]]';
+        }
+        var icon = L.icon({
+            iconUrl: iconUrl,
+            iconSize: [65, 67],
+            iconAnchor: [33, 30]
+        });
+        var markName="ysdwMarker"+option.id;
+        markName = L.marker(
+            [option.latitude , option.longitude],
+            {icon: icon}
+        );
+        resultLayer.addLayer(markName);
+        markName.on("mousemove", function () {
+            pop = L.popup({className:'div_tittle'})
+                .setLatLng([option.latitude,option.longitude])
+                .setContent(
+                    "<span class='bch_tit'>野生动物</span>"+
+                    "<h4>"+option.title+"</h4>"+
+                    "<p>"+option.content+"</p>"
+                ).openOn(map);
+        });
+        markName.on("mouseout", function () {
+            map.closePopup(pop);
+        });
+
+        markName.on("click", function(){
+            var video = $('#fireaudio',parent.document);
+            video[0].pause();
+            detailsDia(option.id,option.reserveplanType);
+        });
+        func(true);
+    }
+
 
     /**
      * 添加偷盗mark
@@ -1105,13 +1231,37 @@
             }
         }
         if (type == 'reserveplan_type_5') {
-            for (var m = 0; m < arr.length; m++) {
-                if (arr[m] == 'tscs') {//偷沙采石
+            for (var n = 0; n < arr.length; n++) {
+                if (arr[n] == 'tscs') {//偷沙采石
                     tscsMarker(json, function (boo) {
                     });
                 }
             }
         }
+        if (type == 'reserveplan_type_6') {
+            for (var o = 0; o < arr.length; o++) {
+                if (arr[o] == 'jgfs') {//秸秆焚烧
+                    jgfsMarker(json, function (boo) {
+                    });
+                }
+            }
+        }
+        if (type == 'reserveplan_type_7') {
+            for (var p = 0; p < arr.length; p++) {
+                if (arr[p] == 'fxfk') {//防汛防控
+                    fxfkMarker(json, function (boo) {
+                    });
+                }
+            }
+        }
+        if (type == 'reserveplan_type_8') {
+            for (var q = 0; q < arr.length; q++) {
+                if (arr[q] == 'ysdw') {//野生动物
+                    ysdwMarker(json, function (boo) {
+                    });
+                }
+            }
+        }
     }
     function showYxt(){
         lkt.remove();//移除轮廓图