Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Googlemap api v3 slower than api v2?

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??

like image 491
alex Avatar asked Dec 28 '22 16:12

alex


2 Answers

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.

like image 118
Trott Avatar answered Feb 07 '23 17:02

Trott


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.

like image 32
Micromega Avatar answered Feb 07 '23 17:02

Micromega