Bug fix: google places not working on mobile correctly
This commit is contained in:
@@ -155,7 +155,14 @@ class Main extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (place.geometry.viewport) {
|
if (place.geometry.viewport) {
|
||||||
map.fitBounds(place.geometry.viewport)
|
console.log('we have viewport', place);
|
||||||
|
|
||||||
|
if (this.state.mobileView === 'MAP') {
|
||||||
|
map.fitBounds(place.geometry.viewport)
|
||||||
|
} else {
|
||||||
|
this.dispatch({type: 'MOBILE_MAP_VIEW'})
|
||||||
|
map.fitBounds(place.geometry.viewport)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
map.setCenter(place.geometry.location)
|
map.setCenter(place.geometry.location)
|
||||||
map.setZoom(18)
|
map.setZoom(18)
|
||||||
@@ -166,10 +173,6 @@ class Main extends React.Component {
|
|||||||
})
|
})
|
||||||
|
|
||||||
control.addEventListener('click', e => {
|
control.addEventListener('click', e => {
|
||||||
//this.setState({
|
|
||||||
//mapClicked: true
|
|
||||||
//})
|
|
||||||
|
|
||||||
this.dispatch({
|
this.dispatch({
|
||||||
type: 'OPEN_FILTERS'
|
type: 'OPEN_FILTERS'
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import fetch from 'isomorphic-fetch'
|
import fetch from 'isomorphic-fetch'
|
||||||
|
|
||||||
//const BASE_URL = 'localhost';
|
//const BASE_URL = 'localhost';
|
||||||
const BASE_URL = '192.168.1.117';
|
const BASE_URL = '192.168.0.13';
|
||||||
|
|
||||||
export const saveContactRequest = (listingId, params) => {
|
export const saveContactRequest = (listingId, params) => {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user