Bing AJAX 地图:在地图缩放和平移结束之前显示信息框触发

发布于 2024-09-13 04:03:40 字数 290 浏览 1 评论 0原文

在我的 Bing Ajax 地图应用程序中,用户会看到一个可供选择的位置列表。 OnRow单击地图中心并放大该地点的位置。当它聚焦于该位置后,它也会显示该位置的信息窗口。

问题是信息窗口似乎在地图完成平移之前加载。这会导致信息窗口出现在错误的位置,或者根本不出现。目前,我已将 show info 方法放入 setTimeout 标记中,以便在加载信息之前再给它一秒钟的时间,但这是一个相当丑陋的 hack,并且仍然无法 100% 地工作。

以前有其他人遇到过这个问题吗?有什么建议吗?

谢谢,

科斯科

In my Bing Ajax Map app the user is presented with a list of locations they can choose from. OnRowClick the map center and zooms on that places location. After it has focused on that location, it shows the info window for it as well.

The problem is that the info window seems to be loading before the map has finished panning. This causes the info window to appear in the wrong spot, or not at all. For now I've put the show info method in a setTimeout tag to give it another second before loading the information, but its a fairly ugly hack and still doesn't work 100% of the time.

Has anybody else run into this problem before? Any suggestions?

Thanks,

Kosko

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

硪扪都還晓 2024-09-20 04:03:40

您正在以单击的位置为中心并进行缩放。您加载的窗口是否有可能每次都进入同一个位置,因为您知道平移完成后您单击的位置将在哪里(即地图的中心)?

这样,窗口可以在地图平移时出现,而不会造成任何问题。

You're centering and zooming on the clicked location. Is it possible that the window you're loading can go in the same place every time, since you know where the location you've clicked will be once it's done panning (i.e. the center of the map)?

That way the window can appear while the map is panning without causing any problems.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文