mapping-component-package-jp 0.1.14 → 0.1.16

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.1.14",
3
+ "version": "0.1.16",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -50,7 +50,7 @@ export class MapOverlayManager {
50
50
  CircleSegment_Edit(ShapeId: string | number, isMobile: boolean): void;
51
51
 
52
52
  // Field Management
53
- DrawField_DrawLocation(locationsJson: string, locationId: any, shapeConfig: any): void;
53
+ DrawField_DrawLocation(locationsJson: string, selectedFarmIdentifier: string, locationId: any, shapeConfig: any): void;
54
54
  TriggerField_ChangeEvent(): any;
55
55
  DrawField_AttachEvents(eHandlers: any): void;
56
56
  DrawField_DetachEvents(StrokeColor: string, SelectedShapeId: string): void;
@@ -130,6 +130,8 @@ export class MapOverlayManager {
130
130
  function fields_BindPolyEvents() {
131
131
  deleteTooltip();
132
132
 
133
+ console.log('mapOverlayManager, fields_BindPolyEvents', polygons);
134
+
133
135
  polygons.forEach(function (poly) {
134
136
  polygonListeners.push(google.maps.event.addListener(poly, 'mouseover', function (event) {
135
137
  deleteTooltip();
@@ -631,7 +633,7 @@ export class MapOverlayManager {
631
633
 
632
634
  // #endregion
633
635
 
634
- _this.DrawField_DrawLocation = function (locationsJson, locationId, shapeConfig) {
636
+ _this.DrawField_DrawLocation = function (locationsJson, selectedFarmIdentifier, locationId, shapeConfig) {
635
637
 
636
638
  locations = JSON.parse(locationsJson, true);
637
639
 
@@ -643,7 +645,9 @@ export class MapOverlayManager {
643
645
  if(location && location.Poly && location.Poly.length > 0 && location.Id > 0) {
644
646
 
645
647
  var paths = location.Poly.map(poly => poly.map(v => new google.maps.LatLng(parseFloat(v[1]), parseFloat(v[0]))));
646
- paths[0].forEach(coord => mbounds.extend(coord));
648
+ if(location.FarmIdentifier == selectedFarmIdentifier) {
649
+ paths[0].forEach(coord => mbounds.extend(coord));
650
+ }
647
651
 
648
652
  let content = `${location.FarmName} - ${location.LocationName}<br>${location.Area} ha${location.IsIrrigated ? ', irrigated' : ''}`;
649
653
 
@@ -670,7 +674,7 @@ export class MapOverlayManager {
670
674
  path: paths[lpi],
671
675
  id: cpid,
672
676
  //content: location.LocationName,
673
- strokeColor: shapeConfig.StrokeColor_DrawEditShape,
677
+ strokeColor: shapeConfig.StrokeColor,
674
678
  strokeOpacity: shapeConfig.StrokeOpacity,
675
679
  strokeWeight: shapeConfig.StrokeWeight,
676
680
  fillColor: shapeConfig.FillColor,
@@ -716,11 +720,11 @@ export class MapOverlayManager {
716
720
  paths: paths,
717
721
  id: cpid,
718
722
  content: content,
719
- strokeColor: shapeConfig.StrokeColor_Other,
723
+ strokeColor: shapeConfig.StrokeColor,
720
724
  strokeOpacity: shapeConfig.StrokeOpacity,
721
725
  strokeWeight: shapeConfig.StrokeWeight,
722
726
  fillColor: shapeConfig.FillColor,
723
- fillOpacity: 0.3, //shapeConfig.FillOpacity,
727
+ fillOpacity: shapeConfig.FillOpacity,
724
728
  zIndex: 10000,
725
729
  clickable: false,
726
730
  editable: false,