haha yeah lat/long based on IP is not very accurate. I am going to be getting my starting coordinates a number of different ways. I am not worried about that (though it is funny that you ended up 75 miles away). Also, the infowindow you saw worked correctly.
Our dataset is most likely not very complete. It has over 8,000 starbucks locations which works well for test data. The xml output contains the 20 locations closest to the lat/long i pass it, so those are what you saw after some panning. You make a very good point about hammering our system. I dont like that idea. I am however going to increase the amount of records in the xml response to 50. I am just worried that if someone starts panning past the scope of those 50 markers, they wont see anything even though there might be data. I am basically trying to create a map that will work with thousands and THOUSANDS of markers without loading them all at once. On Sep 9, 5:19 pm, KirAsh4 <[email protected]> wrote: > On Sep 9, 5:48 pm, GG <[email protected]> wrote: > > > > > I can't seem to hammer the last feature. When a user drags the map, I > > need to re-query my database for new marker points based on the new > > map center. > > Oh yeah, I forgot to ask on this part ... why do you query the DB each > time someone pans the map? Are you showing only markers that reside > in the current viewport? I mean, someone can sit there and move the > map just a tiny bit at a time and your DB gets hammered with every > movement. That's not to say that you shouldn't or can't do that, I'm > just curious. > > If I have to speculate, and you'll have to help a little here, you're > only displaying markers based on the viewport. If that's the case, I > would suggest displaying markers that fall within the viewport +2 > zoomlevels (out, not in). This does two things: a) it allows someone > to pan the map without instantly causing another call to your DB, and > it also allows someone to zoom out at least 2 levels before you have > to query your DB again. (2 levels is just a suggestion, you can go as > far as you want obviously.) > > You could also do background querying ... let the user pan, wait a few > seconds (maybe display a message), and then query the DB. Considering > that when I first loaded your map up (and thanks to Comcast), it > placed me so far away from my actual location, I started panning back > to where I'm actually at. Now I pan fairly fast ... would you want > your script to hit your DB every time I clicked-dragged the map? I > wouldn't. I'd wait a second or two (or longer) to make sure the user > is done panning before I do my query. > > Just my 2 cents ... --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Maps API" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-maps-api?hl=en -~----------~----~----~----~------~----~------~--~---
