mapping-component-package-jp 0.0.29 → 0.0.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/js/mapEncapsulation/mapOverlayManager.js +47 -22
package/package.json
CHANGED
|
@@ -2570,8 +2570,8 @@ export class MapOverlayManager {
|
|
|
2570
2570
|
}
|
|
2571
2571
|
|
|
2572
2572
|
var carea = v.geomarea/10000;
|
|
2573
|
-
|
|
2574
|
-
var content = 'Farm: '+v.name+'<br>';//+v.lpi+'<br>'+carea.toFixed(2)+' ha';
|
|
2573
|
+
var content = 'Farm: '+v.name+'<br>'+v.lpi+'<br>'+carea.toFixed(2)+' ha';
|
|
2574
|
+
//var content = 'Farm: '+v.name+'<br>';//+v.lpi+'<br>'+carea.toFixed(2)+' ha';
|
|
2575
2575
|
|
|
2576
2576
|
var fpoly = new google.maps.Polygon({
|
|
2577
2577
|
map: map,
|
|
@@ -2583,6 +2583,7 @@ export class MapOverlayManager {
|
|
|
2583
2583
|
fillOpacity: 0.01,
|
|
2584
2584
|
id: v.id,
|
|
2585
2585
|
content: content,
|
|
2586
|
+
type: 'pf',
|
|
2586
2587
|
zIndex: 10001,
|
|
2587
2588
|
});
|
|
2588
2589
|
|
|
@@ -2630,6 +2631,7 @@ export class MapOverlayManager {
|
|
|
2630
2631
|
}
|
|
2631
2632
|
|
|
2632
2633
|
var carea = v.geomarea/10000;
|
|
2634
|
+
var content = 'Farm: '+v.farm+'<br>Portion: '+v.name+'<br>'+v.lpi+'<br>'+carea.toFixed(2)+' ha';
|
|
2633
2635
|
|
|
2634
2636
|
var fpoly = new google.maps.Polygon({
|
|
2635
2637
|
map: map,
|
|
@@ -2640,11 +2642,9 @@ export class MapOverlayManager {
|
|
|
2640
2642
|
fillColor: '#000000',
|
|
2641
2643
|
fillOpacity: 0.01,
|
|
2642
2644
|
id: v.id,
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
area: carea.toFixed(2),
|
|
2647
|
-
zIndex: 10001,
|
|
2645
|
+
content: content,
|
|
2646
|
+
type: 'fp',
|
|
2647
|
+
zIndex: 10002,
|
|
2648
2648
|
});
|
|
2649
2649
|
|
|
2650
2650
|
if(fitBounds) {
|
|
@@ -2691,6 +2691,7 @@ export class MapOverlayManager {
|
|
|
2691
2691
|
}
|
|
2692
2692
|
|
|
2693
2693
|
var carea = v.geomarea/10000;
|
|
2694
|
+
var content = 'Erf: '+v.name+'<br>'+v.lpi+'<br>'+carea.toFixed(2)+' ha';
|
|
2694
2695
|
|
|
2695
2696
|
var fpoly = new google.maps.Polygon({
|
|
2696
2697
|
map: map,
|
|
@@ -2701,11 +2702,9 @@ export class MapOverlayManager {
|
|
|
2701
2702
|
fillColor: '#000000',
|
|
2702
2703
|
fillOpacity: 0.01,
|
|
2703
2704
|
id: v.id,
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
area: carea.toFixed(2),
|
|
2708
|
-
zIndex: 10001,
|
|
2705
|
+
content: content,
|
|
2706
|
+
type: 'er',
|
|
2707
|
+
zIndex: 10003,
|
|
2709
2708
|
});
|
|
2710
2709
|
|
|
2711
2710
|
if(fitBounds) {
|
|
@@ -2714,20 +2713,46 @@ export class MapOverlayManager {
|
|
|
2714
2713
|
fpolies.push(fpoly);
|
|
2715
2714
|
});
|
|
2716
2715
|
}
|
|
2716
|
+
SACadastral_BindPolyEvents(isDashboard);
|
|
2717
|
+
}
|
|
2717
2718
|
|
|
2719
|
+
function SACadastral_BindPolyEvents(isDashboard) {
|
|
2720
|
+
deleteTooltip();
|
|
2718
2721
|
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2722
|
+
fpolies.forEach(function (poly) {
|
|
2723
|
+
polygonListeners.push(google.maps.event.addListener(poly, 'mouseover', function (event) {
|
|
2724
|
+
if(poly.type == 'pf') {
|
|
2725
|
+
poly.setOptions({strokeColor: '#f1a81e', strokeWeight: 5, zIndex: 10011});
|
|
2726
|
+
} else if(poly.type == 'fp') {
|
|
2727
|
+
poly.setOptions({strokeColor: '#f1a81e', strokeWeight: 3, zIndex: 10012});
|
|
2728
|
+
} else if(poly.type == 'er') {
|
|
2729
|
+
poly.setOptions({strokeColor: '#f1a81e', strokeWeight: 1, zIndex: 10013});
|
|
2730
|
+
}
|
|
2731
|
+
|
|
2732
|
+
deleteTooltip();
|
|
2733
|
+
injectTooltip(event, poly.content);
|
|
2734
|
+
}));
|
|
2735
|
+
polygonListeners.push(google.maps.event.addListener(poly, 'mousemove', moveTooltip));
|
|
2736
|
+
polygonListeners.push(google.maps.event.addListener(poly, 'mouseout', function(event) {
|
|
2737
|
+
if(poly.type == 'pf') {
|
|
2738
|
+
poly.setOptions({strokeColor: '#000000', strokeWeight: 5, zIndex: 10001});
|
|
2739
|
+
} else if(poly.type == 'fp') {
|
|
2740
|
+
poly.setOptions({strokeColor: '#000000', strokeWeight: 3, zIndex: 10002});
|
|
2741
|
+
} else if(poly.type == 'er') {
|
|
2742
|
+
poly.setOptions({strokeColor: '#000000', strokeWeight: 1, zIndex: 10003});
|
|
2743
|
+
}
|
|
2744
|
+
deleteTooltip();
|
|
2745
|
+
}));
|
|
2746
|
+
if(!isDashboard) {
|
|
2747
|
+
polygonListeners.push(google.maps.event.addListener(poly, 'click', function (event) {
|
|
2748
|
+
deleteTooltip();
|
|
2749
|
+
eventHandlers["SACadastralPolyOnClick"](this.id);
|
|
2750
|
+
}));
|
|
2751
|
+
}
|
|
2752
|
+
});
|
|
2729
2753
|
}
|
|
2730
2754
|
|
|
2755
|
+
|
|
2731
2756
|
_this.RenderSACadastral = function (saCadastralJson, offsetX, offsetY, vmWidth, isDashboard, fitBounds) {
|
|
2732
2757
|
SACadastral_DrawSACadastral(saCadastralJson, offsetX, offsetY, vmWidth, isDashboard, fitBounds);
|
|
2733
2758
|
}
|