简体   繁体   English

在Google地图上将鼠标悬停添加10000个地标,在C#中需要2个小时

[英]Adding 10000 placemark with hover on google map taking 2 hour in C#

I am adding 10000 place mark on google map with hover but it is taking around 2 hour .Which is not good for any user. 我在Google地图上用鼠标悬停添加了10000个地标,但这大约需要2个小时。这对任何用户都不利。

Please suggest me what is the idle time taken by the google map and how i can speed up. 请建议我,谷歌地图的空闲时间是多少,我该如何加快速度。

I am doing following steps 我正在按照以下步骤

1) select distinct locations form database for selected person. 1)为所选人员选择不同的位置表单数据库。

2) Make script to add all the locations of salesman. 2)制作脚本以添加推销员的所有位置。

3) Call google map api(v3) and pass script to it to load all values. 3)调用google map api(v3)并将脚本传递给它以加载所有值。

Please suggest 请建议

Google Maps wasn't made for handling that many markers at the same time and the speed will be quite horrible. Google Maps并不是因为要同时处理那么多标记而设计的,其速度将非常恐怖。 Try to limit the amount of markers placed by grouping them together if there are several near each other until the user zooms in and only load the markers needed for the current visible area. 如果彼此靠近,请尝试通过将标记分组在一起来限制标记的数量,直到用户放大并仅加载当前可见区域所需的标记为止。

I'm not really sure how you are displaying this map but my guess is in a webbrowser control? 我不确定您如何显示此地图,但我的猜测是在Web浏览器控件中? If so, then you could use a helper library such as Marker Clusterer or Marker Manager (both available at http://code.google.com/p/google-maps-utility-library-v3/wiki/Libraries ) to help you out. 如果是这样,那么您可以使用诸如标记群集器或标记管理器之类的帮助程序库(均可在http://code.google.com/p/google-maps-utility-library-v3/wiki/Libraries上获得 )出。

I don't know how much this will help you with 10,000 markers, but after a little bit of searching, it looks like there are more efficient ways of managing markers than just dumping them all onto a map: 我不知道这对10,000个标记有多大帮助,但是经过一番搜索之后,似乎有比将标记全部倾倒到地图上更有效的标记管理方法:

http://www.svennerberg.com/2009/01/handling-large-amounts-of-markers-in-google-maps/ http://www.svennerberg.com/2009/01/handling-large-amounts-of-markers-in-google-maps/

Based on the benchmarks at the end, it's still going to take a few minutes to load 10,000 markers. 根据最后的基准,加载10,000个标记仍需要花费几分钟。 Google Maps certainly wasn't designed to handle that many markers at once. Google Maps并非旨在一次处理那么多标记。 The best way to speed things up is to only add the necessary markers. 加快速度的最佳方法是仅添加必要的标记。 I can't imagine anyone making any sense of 10,000 markers. 我无法想象会有任何意义的10,000个标记。 Narrow it down to only a handful that an end-user can understand and work with. 将范围缩小到最终用户可以理解和使用的少数几个。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM