We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我只使用了自定义DOM组件,类似官网(代码如下)
render(){ return <div style={{width: '100%', height: '400px'}}> <Map events={this.mapEvents} center={this.position}> <Marker position={this.position} /> <div className="customLayer" style={styleA}> <h4>A Custom Layer</h4> <p>Current Center Is: {this.state.center}</p> </div> <div className="customLayer" style={styleB}> <p> Another Custom Layer</p> <Button onClick={()=>{alert('You Clicked!')}}>An Ant Design Button</Button> </div> </Map> </div> }
当网络较慢且第一次加载时,有大概率报Cannot read property 'Q' of null,然后地图会继续慢慢加载出来,但是自定义的DOM组件不会跟着出现。 Chrome的network设置成Slow 3G可能会复现,如有翻墙工具,开全局翻墙基本能够复现
Cannot read property 'Q' of null
The text was updated successfully, but these errors were encountered:
相同的问题 手动清除localStorage后再刷新页面,总是会抱这个错误
Sorry, something went wrong.
我目前的解决方案是加个刷新按钮,点击后重新渲染地图,让用户自己去刷新
相同的问题 手动清除localStorage后再刷新页面,总是会抱这个错误 我目前的解决方案是加个刷新按钮,点击后重新渲染地图,让用户自己去刷新
Map组件的center不能使undefined,如果center为undefined不要传center属性 就没问题了
使用map的getCenter方法可以看到会返回Q属性(如下图)猜测“Cannot read property 'Q' of null”报错原因应该是Map组件的center传入undefined后源码根据传入的center新建一个LatLng点,然后去获取该点的Q值时报错了
No branches or pull requests
我只使用了自定义DOM组件,类似官网(代码如下)
当网络较慢且第一次加载时,有大概率报
Cannot read property 'Q' of null
,然后地图会继续慢慢加载出来,但是自定义的DOM组件不会跟着出现。Chrome的network设置成Slow 3G可能会复现,如有翻墙工具,开全局翻墙基本能够复现
The text was updated successfully, but these errors were encountered: