当地图滚动时动态加载 Google 地图图标

发布于 2024-09-27 14:08:29 字数 655 浏览 0 评论 0原文

我有一个网站,数据库中包含大约 50 万个地理编码位置。我希望人们能够通过地图搜索这些内容。显然,这对于标准的 Google(或者 Bing)地图显示来说太多了,即使使用像 MarkerClusterer 这样的东西也是如此。

因此,我想要做的是,当人们在地图上滚动时动态加载地图数据,这样就不会同时加载太多图标或太多数据。下面是一个已经执行类似操作的网站示例:

http://www.globrix.com/property/buy/wr11%203dl?ns=true&rd=1&hits=10&br=buy& ;qt=wr11+3dl&keyword_field=

不幸的是,我不是一个足够熟练的 JavaScript 程序员来对代码进行逆向工程!所以我希望可能有一个开源项目可供我使用或改编。

我过去主要使用 Google 地图(该网站目前使用 Google 地图进行小区域搜索),但如果 Bing 更容易的话,我也会同样满意。后台全部用PHP。

有什么建议吗?

I have a website with around half a million geocoded locations in a database. I want people to be able to search for these via a map. Obviously, that's far too many for a standard Google (or, for that matter, Bing) map display, even when using something like MarkerClusterer.

What I want to do, therefore, is dynamically load the map data as people scroll around on the map so that there are never too many icons, or too much data, loaded at once. Here's an example of a site which already does something like this:

http://www.globrix.com/property/buy/wr11%203dl?ns=true&rd=1&hits=10&br=buy&qt=wr11+3dl&keyword_field=

Unfortunately, I'm not a skilled enough javascript programmer to reverse engineer that code! So I was hoping that there might be an open source project which I can use or adapt instead.

I've mostly used Google maps in the past (and the site currently uses Google maps for small-area search), but I'd be equally happy with Bing if that's easier. The backend is all in PHP.

Any suggestions?

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

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

发布评论

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

评论(1

不羁少年 2024-10-04 14:08:29

监听地图上的“空闲”事件。

您将需要使用地图的边界进行某种空间查询。

另外,考虑使用 Fusion Table:
http://google.com/fusiontables

Listen for the 'idle' event on the Map.

You'll want to do some sort of spatial query, using the bounds of the Map.

Also, consider using Fusion Tables:
http://google.com/fusiontables

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