0

Since the markers are too many and data is very large. I want to only draw the screen bounded region of markers. while I pan to other region, I can dynamically issue new request only for those not-shown markers. In case of overlapping region, the original-shown markers should not be re-drawn. For some reason,I need to use python as the back-end server script.A typical ajax approach should be used I think.

One problem is A new request may cover the original region of markers. A small move may cause the whole region to be re-drawn. Is there any cache-like thing to remember the previous region data so that the same portion of data won't be sent. Is there any way to do this? Any idea would be appreciated!

4

3 回答 3

1

嗯,你肯定有一个带有标记的数据库,你可以让服务器端的 web 服务公开一个 json 响应,然后你可以从 ajax 调用中使用该 web 服务。

Web 服务在数据库中查询用户的当前位置(使用地理位置 html5 或谷歌地图中的当前中点)。答案必须是区域中的标记数组。

于 2012-06-23T00:32:26.180 回答
1

您还可以查看此处描述的不同方法: https ://developers.google.com/maps/articles/toomanymarkers#markermanager

Markermanager 可能是您正在寻找的:http: //google-maps-utility-library-v3.googlecode.com/svn/tags/markermanager/1.0/docs/reference.html

于 2012-06-23T01:03:13.057 回答
0

谷歌地图 API [示例][1]

[1]:https ://google-developers.appspot.com/maps/documentation/javascript/examples/event-arguments 应该可以解决您的问题

于 2012-08-24T00:02:25.590 回答