mapping-component-package-jp 0.0.28 → 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 +4 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/js/mapEncapsulation/mapOverlayManager.js +52 -23
package/package.json
CHANGED
|
@@ -2458,11 +2458,15 @@ export class MapOverlayManager {
|
|
|
2458
2458
|
|
|
2459
2459
|
fpolies.forEach(function (poly) {
|
|
2460
2460
|
polygonListeners.push(google.maps.event.addListener(poly, 'mouseover', function (event) {
|
|
2461
|
+
poly.setOptions({strokeColor: '#f1a81e', zIndex: 10010});
|
|
2461
2462
|
deleteTooltip();
|
|
2462
2463
|
injectTooltip(event, poly.content);
|
|
2463
2464
|
}));
|
|
2464
2465
|
polygonListeners.push(google.maps.event.addListener(poly, 'mousemove', moveTooltip));
|
|
2465
|
-
polygonListeners.push(google.maps.event.addListener(poly, 'mouseout',
|
|
2466
|
+
polygonListeners.push(google.maps.event.addListener(poly, 'mouseout', function(event) {
|
|
2467
|
+
poly.setOptions({strokeColor: '#000000', zIndex: 10000});
|
|
2468
|
+
deleteTooltip();
|
|
2469
|
+
}));
|
|
2466
2470
|
if(!isDashboard) {
|
|
2467
2471
|
polygonListeners.push(google.maps.event.addListener(poly, 'click', function (event) {
|
|
2468
2472
|
deleteTooltip();
|
|
@@ -2566,8 +2570,8 @@ export class MapOverlayManager {
|
|
|
2566
2570
|
}
|
|
2567
2571
|
|
|
2568
2572
|
var carea = v.geomarea/10000;
|
|
2569
|
-
|
|
2570
|
-
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';
|
|
2571
2575
|
|
|
2572
2576
|
var fpoly = new google.maps.Polygon({
|
|
2573
2577
|
map: map,
|
|
@@ -2579,6 +2583,7 @@ export class MapOverlayManager {
|
|
|
2579
2583
|
fillOpacity: 0.01,
|
|
2580
2584
|
id: v.id,
|
|
2581
2585
|
content: content,
|
|
2586
|
+
type: 'pf',
|
|
2582
2587
|
zIndex: 10001,
|
|
2583
2588
|
});
|
|
2584
2589
|
|
|
@@ -2626,6 +2631,7 @@ export class MapOverlayManager {
|
|
|
2626
2631
|
}
|
|
2627
2632
|
|
|
2628
2633
|
var carea = v.geomarea/10000;
|
|
2634
|
+
var content = 'Farm: '+v.farm+'<br>Portion: '+v.name+'<br>'+v.lpi+'<br>'+carea.toFixed(2)+' ha';
|
|
2629
2635
|
|
|
2630
2636
|
var fpoly = new google.maps.Polygon({
|
|
2631
2637
|
map: map,
|
|
@@ -2636,11 +2642,9 @@ export class MapOverlayManager {
|
|
|
2636
2642
|
fillColor: '#000000',
|
|
2637
2643
|
fillOpacity: 0.01,
|
|
2638
2644
|
id: v.id,
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
area: carea.toFixed(2),
|
|
2643
|
-
zIndex: 10001,
|
|
2645
|
+
content: content,
|
|
2646
|
+
type: 'fp',
|
|
2647
|
+
zIndex: 10002,
|
|
2644
2648
|
});
|
|
2645
2649
|
|
|
2646
2650
|
if(fitBounds) {
|
|
@@ -2687,6 +2691,7 @@ export class MapOverlayManager {
|
|
|
2687
2691
|
}
|
|
2688
2692
|
|
|
2689
2693
|
var carea = v.geomarea/10000;
|
|
2694
|
+
var content = 'Erf: '+v.name+'<br>'+v.lpi+'<br>'+carea.toFixed(2)+' ha';
|
|
2690
2695
|
|
|
2691
2696
|
var fpoly = new google.maps.Polygon({
|
|
2692
2697
|
map: map,
|
|
@@ -2697,11 +2702,9 @@ export class MapOverlayManager {
|
|
|
2697
2702
|
fillColor: '#000000',
|
|
2698
2703
|
fillOpacity: 0.01,
|
|
2699
2704
|
id: v.id,
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
area: carea.toFixed(2),
|
|
2704
|
-
zIndex: 10001,
|
|
2705
|
+
content: content,
|
|
2706
|
+
type: 'er',
|
|
2707
|
+
zIndex: 10003,
|
|
2705
2708
|
});
|
|
2706
2709
|
|
|
2707
2710
|
if(fitBounds) {
|
|
@@ -2710,20 +2713,46 @@ export class MapOverlayManager {
|
|
|
2710
2713
|
fpolies.push(fpoly);
|
|
2711
2714
|
});
|
|
2712
2715
|
}
|
|
2716
|
+
SACadastral_BindPolyEvents(isDashboard);
|
|
2717
|
+
}
|
|
2713
2718
|
|
|
2719
|
+
function SACadastral_BindPolyEvents(isDashboard) {
|
|
2720
|
+
deleteTooltip();
|
|
2714
2721
|
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
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
|
+
});
|
|
2725
2753
|
}
|
|
2726
2754
|
|
|
2755
|
+
|
|
2727
2756
|
_this.RenderSACadastral = function (saCadastralJson, offsetX, offsetY, vmWidth, isDashboard, fitBounds) {
|
|
2728
2757
|
SACadastral_DrawSACadastral(saCadastralJson, offsetX, offsetY, vmWidth, isDashboard, fitBounds);
|
|
2729
2758
|
}
|