-
Notifications
You must be signed in to change notification settings - Fork 857
TypeError: Cannot read property 'lat' of undefined #293
Copy link
Copy link
Closed
Description
The error occurs when you use "fitBounds" with "ne" and "sw"
import { fitBounds } from 'google-map-react/utils'
const size = {
width: $( this.refs.mapWrapper ).width(),
height: $( this.refs.mapWrapper ).height()
}
const bounds = {
ne: {
lat: NorthEast.lat(),
lng: NorthEast.lng()
},
sw: {
lat: SouthWest.lat(),
lng: SouthWest.lng()
}
}
const {center, zoom} = fitBounds(bounds, size)In the folder with the module in the code I do not see the code for such a case, although it is in the readme:
http://joxi.ru/KAx91RZuMZlZJr
At the same time, I see support for such behavior here:
https://github.com/istarkov/google-map-react/blob/master/src/utils/utils.js
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels