Gmap custom markers drupal hosting
I am using Gmap3 to load a Google Map onto my site. Within this map there are 100+ markers. The problem is the map is very slow to load, taking over a minute to load the entire map.
How do I speed up the loading for a map with a lot of markers?
I am using the latest version of Gmap3 (v6) and I am using jQuery 2.1.
I tried changing the zoom level to a much closer view but that did not work. I also removed the green marker but that didn't speed things up either.
I wondered if changing the method from address to latitude and longitude would help speed things up but that is time intensive to do if it has little or no benefit.
From what I can see using Firebug it appears that the script is requesting each marker, getting them all, then displaying the marker. With each marker averaging 100ms (roughly) it takes over a minute to do.
Is there a way to speed this up? Maybe request more than one marker at a time?
In researching this on Gmap3's website I came across clustering. I implemented the example provided in the download file but it still loads painfully slow.
As it turns out changing from using address to longitude/latitude worked. I also am using it in conjunction with the clustering feature of Gmap3 and it is now working quickly and smoothly.
The code above works but change this line(s):
I believe the reason for this is using the address the script had to lookup the address and return the correct location. Using longitude and latitude there is only one location and it can quickly plot the location.