mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-26 06:47:17 +10:00
Merge pull request #804 from sharetribe/search-map-control-position
Change search map controls for visibility
This commit is contained in:
commit
db03339981
1 changed files with 9 additions and 0 deletions
|
|
@ -148,6 +148,11 @@ const MapWithGoogleMap = withGoogleMap(props => {
|
|||
/>
|
||||
) : null;
|
||||
|
||||
const controlPosition =
|
||||
typeof window !== 'undefined' && typeof window.google !== 'undefined'
|
||||
? window.google.maps.ControlPosition.LEFT_TOP
|
||||
: 5;
|
||||
|
||||
return (
|
||||
<GoogleMap
|
||||
defaultZoom={zoom}
|
||||
|
|
@ -164,6 +169,10 @@ const MapWithGoogleMap = withGoogleMap(props => {
|
|||
clickableIcons: false,
|
||||
// When infoCard is open, we can't differentiate double click on top of card vs map.
|
||||
disableDoubleClickZoom: !!infoCardOpen,
|
||||
zoomControlOptions: {
|
||||
position: controlPosition,
|
||||
},
|
||||
streetViewControl: false,
|
||||
}}
|
||||
ref={onMapLoad}
|
||||
onIdle={onIdle}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue