当使用谷歌的S2几何图形库在谷歌地图小部件上绘制S2单元格时,我得到的单元格超出了我指定的(常量)范围。
class SomeComponent {
componentWillMount() {
if (typeof localStorage !== 'undefined') {
console.log('I get to here...', localStorage.getItem('someValue')) // this comes in as expected always
this.props.setMyReduxState(localStorage.getItem('someValue'))
}
}
render () {
// will have the value of the localStorage item someValue when navigated into the page
// will be an empty string if I do a hard refresh
console.log('this.props.myReduxState', this.props.myReduxState)
return (
<div>
Stuff...
</div>
)
}
}
const mapStateToProps = (state) => {
return {
myReduxState: state.something.myReduxState || ''
}
}
const mapDispatchToProps = (dispatch) => {
return {
setMyReduxState (someValue) {
dispatch(setMyReduxState(someValue))
}
}
}
结果细胞的水平为11-14,我哪里错了?
答案 0 :(得分:0)
显然这是设计的,而且使用这个函数,传递区域中的任何一个点以及一个空的ArrayList都可以解决问题。
cov.getSimpleCovering(region_rect, bl.toPoint(),14,cells);