Closed sudheer517 closed 11 years ago
use ajax and pagination
Using Firefox, and addMarkers with around 200 markers, and it still takes 2 seconds to load.
I think addMarkers
call is not the same as addMarkers
call mentioned here http://gmaps-utility-library.googlecode.com/svn/trunk/markermanager/release/docs/examples.html
Adding markers collectively using addMarkers() is recommended as it is more efficient.
Could this be a reason?
Yes I dont use marker manager library. 2 seconds is a bit long though, do you use ajax to get markers?
After some investigation, I found out that I can ignore positions outside current bound before I add them in. This reduced the hang-time to a more acceptable level.
This time I did a proper benchmark, and adding 380 markers (and filtering a lot more) takes around 1283 ms. The time does not include ajax http request.
I have nearly 2.5 lakhs records in my database. I am passing all records to the markers,the map works fine but it takes so longtime to load nearly 2 minutes.