服务器端Google标记集群 - Python / Django [英] Server Side Google Markers Clustering - Python/Django

查看:98
本文介绍了服务器端Google标记集群 - Python / Django的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



在尝试使用客户端方法对大量Google标记进行聚类后,我决定不可能进行项目(拥有28,000个用户的社交网络) p>是否有任何服务器端的坐标聚类示例 - 最好是在Python / Django中?



我想要这样工作的方式是逐渐地将标记基于它们的接近度(半径)和缩放级别。换句话说,当新用户注册他/她被自动分配给彼此接近的某个组标记时,从而增加组计数器。发送到服务器的只是少数的组。只有当地图缩放级别/缩放比例为1:1时,实际用户才会显示在地图上。



客户端每个请求/缩放级别只需要处理10-50个标记。

解决方案

我在这里写了一篇关于我使用Python和Django的方法的博文:



http://www.quanative.com/2010/01/01/server-side-marker-clustering-for-google-maps-with-python/


After experimenting with client side approach to clustering large numbers of Google markers I decided that it won't be possible for my project (social network with 28,000+ users).

Are there any examples of clustering the coordinates on the server side - preferably in Python/Django?

The way I would like this to work is to gradually index the markers based on their proximity (radius) and zoom level.

In another words when a new user registers he/she is automatically assigned to a certain 'group' of markers that are close to each other thus increasing the 'group's' counter. What's being send to the server is just a small number of 'groups'. Only when the zoom level/scale of map is 1:1 - actual users are shown on the map.

That way the client side will have to deal only with 10-50 markers per request/zoom level.

解决方案

I wrote a blog post about my approach using Python and Django here:

http://www.quanative.com/2010/01/01/server-side-marker-clustering-for-google-maps-with-python/

这篇关于服务器端Google标记集群 - Python / Django的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆