Googlemap api v3 slower than api v2?

自闭症网瘾萝莉.ら 提交于 2019-12-21 17:46:42

问题


I am in the midst of converting old googlemap v2 code to v3 and it looks if v3 is much slower than v2?

Most of my code change is just replacing G with google.maps. (GMarker to google.maps.Marker)

Any tips or tricks how to speed things up??


回答1:


The solution might be as simple as experimenting with different versions of the v3 API by trying v=3.4 and v=3.5 in your links that load the API like so:

<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false&v=3.5"></script>

And:

<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false&v=3.4"></script>

On a site I built, the product manager felt that Streetview in particular was sluggish in 3.6. When I rolled it back to 3.5, he felt that it was a noticeable improvement.




回答2:


Don't use it unless you really need it. Never change a running system. Maybe you want to write a better marker solution with a better clustering (spatial index, quadtree, heatmap)? I.e. Google's fusion table doesn't support a spatial index. You want to look for Nick's spatial index hilbert curve quadtree blog.




回答3:


My problem probably was with using FireBug - then the V3 api is loading slower than V2. Also, switching between satellite and normal map makes slow fade effect when FireBug is on.



来源:https://stackoverflow.com/questions/6801251/googlemap-api-v3-slower-than-api-v2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!