I am in the process of creating a site for real estate listings optimized for a mobile environment. One of the features that is desired would be a google map that loads listings as the user drags. One of the catches to this is that very few listings have included latitude and longitude values. Therefore, every time I need to add a listing to the map I first need to geocode it. Now with a few listings this is not really a big deal. However, the end goal would be to show all listings within the current bounds. Which depending on the zoom level could be anywhere from a hand full to several hundred. However, when I attempt to load say 100 listings to the map it pretty much freezes and is fairly buggy after wards.
That said I was wondering if there is a better way to handle this. Perhaps submitting the listings as places with a CRON and having markers generated automatically? I am just trying to think how I can achieve this in a way which doesn't kill a mobile phone because it seems impossible considering there could be over 5000 listings in bounds of the map area. The only real solution I have is to only show say 30 or so and use pagination for the next 30 and so one within bounds.
The ultimate goals is when the map bounds change ALL listings will show up within that bounds. The way I have currently approached this is that when the user stop dragging the map a asynchronous request pulls in ALL listings within bounds as an XML those full addresses are geocoded and added to the map. However, this is wrecking havok on the browser and I am not even going to try it in a mobile environment considering its dragging a desk top down. I'm thinking this is less and practical and pagination has to be used but perhaps someone out there has dealt with a similar objective.
Someone will most likely have this same question so I will mention [Google Map Utilities. Particularly, the [url=http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/docs/examples.html]MapClusterer](http://code.google.com/p/google-maps-utility-library-v3/wiki/Libraries) extension which is magnificent. I'm loading just around 3000 markers give or take in a series of threaded asynchronous requests and there is very little noticeable lag or degradation of experience while all the markers load.