mapping-component-package-jp 0.1.14 → 0.1.15

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.15",
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