Groups
Groups
Sign in
Groups
Groups
谷歌地图 API 论坛
Conversations
About
Send feedback
Help
优化google map 加载marker数度问题?
25 views
Skip to first unread message
map
unread,
Jul 2, 2008, 4:43:08 AM
7/2/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google 地图 API 讨论组
我现在有10000个标注点,请问高手怎么能快速加载标注点在地图上显示
不影响数度,速度不会太慢?
我现在用MarkerManager分级显示可以加快点速度,但是标注点多速度一样很慢
在有要是标注点都在同一级,就麻烦了。
请问还有什么办法?
gwpxjb
unread,
Jul 2, 2008, 5:25:34 AM
7/2/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google 地图 API 讨论组
能不能搞类似加载地图那样,分类加载呢?
Dorian
unread,
Jul 2, 2008, 5:44:00 AM
7/2/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google 地图 API 讨论组
10000个点着实有些多。就算存到数组里也会不小。
楼主可以考虑变通的方法,而不是从地图API本身找解决方法。
比如可以尝试分批载入,分批显示,分批删除,遵循按需显示的方法(看到多少显示多少)
另外MarkerManager个人觉得功能过于简单,不如自己从写个适合自己的manager之类的。
map
unread,
Jul 2, 2008, 9:24:41 PM
7/2/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google 地图 API 讨论组
Dorian 谢谢您的回复.
我现在在用一个封装好了的markermanager.js,并且也分批载入标注点分级显示。
可是要是所有标注点都在同一级,作用就不大了,
所以我就取当前地图的显示级别zoom和地图的东北、西南角的经纬度,在数据库中
取在这个范围内的标注点加载显示,并在地图的zoomend和dragend事件里写了
删除和加载标注点函数,当地图缩放和拖拽时,显示当前范围内的标注点,
这样不管有多少个标注点,速度都能很快,速度没问题解决了,但是也出现了新的问题?
就是当添加新的标注点和点击现有标注点时,弹出信息窗,这时显示不下,地图会自动
移动,movend事件发生,因没有在movend事件里有处理程序,所以新的出现的地方没有标注点
是空白的,可是实际上是有标注点,我又在movend事件里添加了删除和加载标注点函数
这时会出现新的标注点,因为有删除标注点函数(是防止重复添加,有两个同样的标注点,当删除
标注点时出现没删掉的假象)所以新添加的标注点没了,还没有添加信息呢,保存不了,点击已有的
标注点,信息框消失,现在,不知道怎么解决这个问题,请帮帮我,谢谢!
Reply all
Reply to author
Forward
0 new messages