mapping-component-package-jp 0.2.17 → 0.2.19

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.2.17",
3
+ "version": "0.2.19",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -35,7 +35,7 @@ export class MapOverlayManager {
35
35
 
36
36
  // Rendering Methods
37
37
  RenderFields(locations: any[], properties: any, editMode?: boolean): void;
38
- RenderFieldsMobile(locations: any[]): void;
38
+ RenderFieldsMobile(locations: any[], shouldBindEvents: boolean): void;
39
39
  RenderRegionFarms(locationsJson: any, icon: any, fitBounds: boolean, offsetX: number, offsetY: number): void;
40
40
  RenderRegions(regionLocations: any[], properties: any, farmLocations: any[], icon: any, offsetX: number, offsetY: number): void;
41
41
  RenderBackgroundFields(locations: any[], properties: any): void;
@@ -59,7 +59,7 @@ export class MapOverlayManager {
59
59
  CircleSegment_Edit(ShapeId: string | number, isMobile: boolean): void;
60
60
 
61
61
  // Field Management
62
- DrawField_DrawLocation(locationsJson: string, selectedFarmIdentifier: string, locationId: any, shapeConfig: any): void;
62
+ DrawField_DrawLocation(locationsJson: string, selectedFarmIdentifier: string, locationId: any, shapeConfig: any, shouldBindEvents: boolean): void;
63
63
  UploadedFields_DrawLocations(locationsJson: string, offsetX: number, offsetY: number): void;
64
64
  UploadedField_GetId(Id: string | number): any;
65
65
 
@@ -442,7 +442,7 @@ export class MapOverlayManager {
442
442
  polygonsToMap_set();
443
443
  };
444
444
 
445
- _this.RenderFieldsMobile = function (locations) {
445
+ _this.RenderFieldsMobile = function (locations, shouldBindEvents) {
446
446
  var mbounds = new google.maps.LatLngBounds();
447
447
 
448
448
  locations.forEach(function (location) {
@@ -473,8 +473,9 @@ export class MapOverlayManager {
473
473
 
474
474
  map.fitBounds(mbounds);
475
475
 
476
- fields_BindPolyEventsMobile();
477
-
476
+ if (shouldBindEvents) {
477
+ fields_BindPolyEventsMobile();
478
+ }
478
479
  };
479
480
 
480
481
  _this.destroy = function () {
@@ -820,7 +821,7 @@ export class MapOverlayManager {
820
821
  fPolies_clear();
821
822
  }
822
823
 
823
- _this.DrawField_DrawLocation = function (locationsJson, selectedFarmIdentifier, locationId, shapeConfig) {
824
+ _this.DrawField_DrawLocation = function (locationsJson, selectedFarmIdentifier, locationId, shapeConfig, shouldBindEvents) {
824
825
 
825
826
  locations = JSON.parse(locationsJson, true);
826
827
 
@@ -925,7 +926,9 @@ export class MapOverlayManager {
925
926
  });
926
927
 
927
928
  map.fitBounds(mbounds);
928
- fields_BindPolyEvents();
929
+ if (shouldBindEvents) {
930
+ fields_BindPolyEvents();
931
+ }
929
932
  //console.log(polygons);
930
933
  }
931
934