mapping-component-package-jp 0.0.5 → 0.0.7
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
|
@@ -18,7 +18,7 @@ export class MapOverlayManager {
|
|
|
18
18
|
|
|
19
19
|
// Rendering Methods
|
|
20
20
|
RenderFields(locations: any[], properties: any, editMode?: boolean): void;
|
|
21
|
-
RenderRegionFarms(locationsJson: any, icon: any): void;
|
|
21
|
+
RenderRegionFarms(locationsJson: any, icon: any, fitBounds: boolean): void;
|
|
22
22
|
RenderRegions(locations: any[], properties: any): void;
|
|
23
23
|
RenderBackgroundFields(locations: any[], properties: any): void;
|
|
24
24
|
|
|
@@ -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
|
|