On Jan 1, 8:48 pm, caffeinated <[email protected]> wrote: > I am developing a website that could possibly have in excess of 1000 > positions to marker. But to save resources I only want to read from > the database the markers I want to load (similar towww.realestate.com.au's > map view). > I am assuming there is a tutorial out there that shows me how to do > this, or a Google utility. But I haven't worked out what I should be > typing into the Google search bar to get the right result. > > Just in case my wording is not clear above I will give an example of > what I want to do. > Say my database has 1000 locations stored in it. > Say my map is zoomed to display 37.000 - 38.000S, 144.000 - 145.000E. > Say in that section I have 142 locations that are located within that > area. > I only want to load those 142 positions from the 1000 stored in my > database to be turned into markers on my map. > How could I achieve this?
You need to query the map for the bounds and use the returned bounding box to query your database. I don't know of any tutorials (which doesn't mean there aren't any). http://groups.google.com/group/google-maps-js-api-v3/search?group=google-maps-js-api-v3&q=view+all+in+bounds+database&qt_g=Search+this+group The v2 group also would be useful to search (the details of getting the bounds will be different, but the concept is the same): http://groups.google.com/group/google-maps-api/search?group=google-maps-api&q=view+all+in+bounds+database&qt_g=Search+this+group This example from the book "Beginning Google Maps Applications with PHP or Rails and AJAX: From Novice to Professional" http://www.googlemapsbook.com/chapter7/ServerBounds/map_functions.js.source#l7-1 may help. -- Larry > > Regards, > > Sam. -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" 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-js-api-v3?hl=en.
