Marker组件无法显示在地图里
Closed this issue · 0 comments
johnkhor0216 commented
- 我已经搜索过 issue,没有类似的问题,或者类似的问题仍然没有解决方案。
- 我已经搜索过文档,并且仍然没有找到解决方案。
- 我写了个问题重现的例子,链接或者代码将会贴在下面。
问题描述
Marker没有在地图里出现
代码
class MyAMap extends Component {
constructor (props:any) {
super (props)
this.state = {
}
}
public render() {
return (
<div style={{width: '100%', height: '400px'}}>
<Map amapkey={mapKey} zoom={10} plugins={['ToolBar']}>
<Marker position={{longitude: 116.337926, latitude: 40.018185}}/>
</Map>
</div>
)
}
}