From 2788b9a7b2b0d765c418037af4ea6bd44804b4fe Mon Sep 17 00:00:00 2001 From: Vesa Luusua Date: Fri, 4 Dec 2020 18:19:33 +0200 Subject: [PATCH 1/2] Show whole world if no bounds or center --- src/components/SearchMap/SearchMapWithGoogleMap.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/components/SearchMap/SearchMapWithGoogleMap.js b/src/components/SearchMap/SearchMapWithGoogleMap.js index b7ba46b109..f908fa8c4a 100644 --- a/src/components/SearchMap/SearchMapWithGoogleMap.js +++ b/src/components/SearchMap/SearchMapWithGoogleMap.js @@ -466,8 +466,18 @@ class SearchMapWithGoogleMap extends Component { } render() { - const { onMapLoad, onMapMoveEnd, ...rest } = this.props; - return ; + const { onMapLoad, onMapMoveEnd, center, bounds, zoom, ...rest } = this.props; + const zoomAndCenter = + !bounds && !center ? { zoom: 1, center: { lat: 0, lng: 0 } } : { zoom, center }; + return ( + + ); } } From d1da71e4d58048eda72b43d2a3c0b08ce0a63579 Mon Sep 17 00:00:00 2001 From: Vesa Luusua Date: Mon, 7 Dec 2020 16:23:01 +0200 Subject: [PATCH 2/2] Update Changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ea7f3834c3..2d1446a544 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,8 @@ way to update this template, but currently, we follow a pattern: ## Upcoming version 2020-XX-XX +- [fix] Fix Google Maps default centering if no bounds or center is given. + [#1386](https://github.com/sharetribe/ftw-daily/pull/1386) - [fix] Fix FieldCheckbox validation on blur event on Firefox. [#1384](https://github.com/sharetribe/ftw-daily/pull/1384)