我仍在开发我的谷歌地图应用程序。 然而,服务器端的集群可以工作,但同时它非常慢,有时如果我缩小太多并进行平移,我的浏览器就会停止。
我只能选择使用集群来隐藏这么多。
编辑
我正在考虑在这种情况下使用 Mapplet,但不知道如何使用它们 - 相反,我不知道它们到底是什么。 我正在尝试根据您在此链接中看到的内容构建一些内容< /a>. 同一页面上有大量的标记,并且该页面不会消失。 大家有什么想法吗?
I'm still working on my google maps application. However clustering on the server end works but at the same time its quite slow and at times if I'm zooming out too much and playing around with the panning my browser stalls.
There is only so much that I can choose to hide using clusters.
EDIT
I'm thinking of using mapplets in this case but have no idea how to use them - rather I have no idea what they are exactly. I'm trying to build something on the lines of what you see at this link. Loads and loads of markers on the same page and the page isn't dying out. Any ideas guys?
发布评论
评论(2)
您是否尝试过对标记进行预聚类?
更新:
如果您想制作自定义图块叠加层,请参阅Google 关于该主题的文档。 还有另一个例子这里,但我不知道他们是如何创建的服务器端的图块。 这可能会有点棘手。
如果您能弄清楚如何制作瓷砖,那将是一个很好的解决方案。 否则,我认为服务器端集群要简单得多。 如果您可以发布指向您页面的链接,我们就可以了解是什么导致速度变慢。
Have you tried pre-clustering your markers?
UPDATE:
If you want to make a custom tile overlay, here is Google's documentation on the subject. There's another example here, but I don't know how they create the tiles on the server side. It will probably be a little tricky.
If you can figure out how to make the tiles, that would be a great solution. Otherwise, I think that server-side clustering is much simpler. If you could post a link to your page, we could see what's slowing it down.
那么您可以尝试使用 MarkerClusterer (示例)。
有关详细信息,请参阅我对类似问题的回答,其中我建议了该库中的另一个插件,该插件也恰好具有集群支持。
另外要回答你的问题为什么该地图没有“消亡”:
它没有消亡,因为你看到的一切实际上都是图像。 我不确定是否可以从此处热链接它,但请尝试 此链接。 由于它只是一个叠加图像,因此您不必绘制标记。 对图像的点击由 JavaScript 处理,如果您点击标记应位于的图像,则会绘制一个弹出窗口。
Well you could try using MarkerClusterer (examples).
For more information read my answer on similar question where I suggested another plugin from that library which also happens to have clustering support.
Also to answer your question why that map is not "dying":
It's not dying because everything you see is actually an image. I'm not sure if I can hotlink it from here but try this link. Since it's just an overlay image, you don't have to draw markers. Clicks on the image are processed by JavaScript and a pop-up is drawn if you click on the image where a marker should be located.