Sencha 重新渲染 MapPanel
我有一个 MapPanel,想在地图上显示一个标记。地图在渲染之前需要等待一些数据。
我正在加载一些坐标,当它们加载时,我希望地图能够(重新)渲染自身。
这怎么可能?
多谢!
I have a MapPanel and want to show a marker on the map. The map needs to wait on some data before rendering.
I'm loading som coordinates, and when they are loaded, I want the map to (re)render itself.
How is that possible?
Thanks a lot!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不确定您是否希望地图完全重新渲染。我认为计算地图的新边界就足够了,以便适合您正在加载的地图上的所有标记。
为此,请参阅:
Google 地图 API v3 - 设置边界和中心
I'm not sure if you'd like the map to rerender itself completely. I think it would be enough for you to calculate the new bounds of your map, in order to fit all the markers on the map that you are loading.
In order to do this, see:
Google Map API v3 — set bounds and center