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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mapping-component-package-jp",
3
- "version": "0.0.29",
3
+ "version": "0.0.30",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -2570,8 +2570,8 @@ export class MapOverlayManager {
2570
2570
  }
2571
2571
 
2572
2572
  var carea = v.geomarea/10000;
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';
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
- name: v.name,
2644
- farm: '',
2645
- //lpi: v.lpi,
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
- name: v.name,
2705
- farm: '',
2706
- //lpi: v.lpi,
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
- if(type == 'pf') {
2721
- addListeners(pfpolies, type);
2722
- } else if(type == 'fp') {
2723
- addListeners(fppolies, type);
2724
- } else if(type == 'er') {
2725
- addListeners(erpolies, type);
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
  }