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.