mapping-component-package-jp 0.0.5 → 0.0.6

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.5",
3
+ "version": "0.0.6",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -219,7 +219,7 @@ export class MapOverlayManager {
219
219
  }
220
220
  }
221
221
 
222
- function AdvancedMarker(locations, icon, markerType = 'field') {
222
+ function AdvancedMarker(locations, icon, markerType = 'field', fitBounds) {
223
223
  if (map.getMapCapabilities().isAdvancedMarkersAvailable && locations && locations.length > 0) {
224
224
  var mapBounds = new google.maps.LatLngBounds();
225
225
  locations.forEach(function(v) {
@@ -284,7 +284,7 @@ export class MapOverlayManager {
284
284
  fmarkers.push(fmarker);
285
285
  });
286
286
 
287
- if (markerType === 'farm') {
287
+ if (markerType === 'farm' && fitBounds) {
288
288
  map.fitBounds(mapBounds);
289
289
  farms_BindMarkerEvents();
290
290
  }
@@ -1897,9 +1897,9 @@ export class MapOverlayManager {
1897
1897
 
1898
1898
  }
1899
1899
 
1900
- _this.RenderRegionFarms = function (locationsJson, icon) {
1900
+ _this.RenderRegionFarms = function (locationsJson, icon, fitBounds) {
1901
1901
  if(icon){
1902
- AdvancedMarker(locationsJson, icon, 'farm');
1902
+ AdvancedMarker(locationsJson, icon, 'farm', fitBounds);
1903
1903
  }
1904
1904
  }
1905
1905