Merge pull request #804 from sharetribe/search-map-control-position

Change search map controls for visibility
This commit is contained in:
Kimmo Puputti 2018-04-11 15:21:03 +03:00 committed by GitHub
commit db03339981
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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}