On Jan 13, 5:45 am, marcelo <[email protected]> wrote:
> It's a lot easier if you think in pixels instead of lat/lon, then you
> don't need to worry about zoom levels.
You don't need to worry about zoom levels with my method. I envisaged
something like the following, which is admittedly untested:
var mapBounds=map.getBounds();
var mapNECorner=mapBounds.getNorthEast();
var mapSWCorner=mapBounds.getSouthWest();
var spanlng=Math.abs(mapNECorner.lng()-mapSWCorner.lng());
// Calculate the moved amount
// assuming centre points are stored as old and new
var movelng=Math.abs(newCenter.lng()-oldCenter.lng());
// Do the same thing for latitude and arrive at
// spanlat and movelat
if ((movelng/spanlng > 0.1) || (movelat/spanlat > 0.1))
{ // get more data }
Andrew
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---