Oh, that wasn't too hard. This is what you need to do before loading
your file:
var center = map.getCenter();
var span = map.getBounds().toSpan();
var centreLat = center.y;
var centreLng = center.x;
var spanLat = span.y;
var spanLng = span.x;
var url =
"marker_input.php?lat="+centreLat+"&lng="+centreLng
+"&spanlat="+spanLat+"&spanlng="+spanLng;
Then in the script which picks up the points from the database, derive
the 'box' from which you return points by using the centre and span
values.
Greets,
Babak Fakhamzadeh
On Sep 25, 3:44 pm, MastaBaba <[EMAIL PROTECTED]> wrote:
> Hiya,
>
> That works for only showingmarkersat a certain distance from the
> center of the viewed map.
>
> But what if you want to pick up allmarkerswithin the map window?
> You'd need to pass on the boundary of the mapwindow to the file which
> returns themarkers. Something like map.getbounds(), if it exists.
> Thing is, I can't find the appropriate function for this. Any ideas?
>
> Greetings,
>
> Babak Fakhamzadeh
>
> On Sep 23, 5:17 pm, Swanson <[EMAIL PROTECTED]> wrote:
>
> > Your best bet would be to have all themarkersstored in a Mysql
> > Database, and then create a PHP file which loads thesemarkersbased
> > on a radius using the centerpoint of your map.
>
> > I've written this example, which is largely based on code i've found
> > around here which might
> > help:http://www.swansoninternet.com/content/view/30/28/
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---