<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7655.4">
<TITLE>RE: [OpenLayers-Users] How can I get the bounds of the map when zooming?</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2><A HREF="http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/Map-js.html#OpenLayers.Map.getExtent">http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/Map-js.html#OpenLayers.Map.getExtent</A><BR>
<BR>
<BR>
-----Original Message-----<BR>
From: users-bounces@openlayers.org on behalf of Adrián Ribao Martínez<BR>
Sent: Sat 9/5/2009 5:32 AM<BR>
To: users@openlayers.org<BR>
Subject: [OpenLayers-Users] How can I get the bounds of the map when zooming?<BR>
<BR>
Hello,<BR>
<BR>
I need to show some points loaded using ajax and geojson into the map. I want the points to be just in the area of the map that is shown, so when I zoom I need the bounds of the map and make a new ajax request with the bounds as parameters.<BR>
<BR>
Can this be done? Where can I find examples and docs about this?<BR>
<BR>
I think it would work like this:<BR>
<BR>
1. Load the map with some features<BR>
2. The user zooms in a region<BR>
3. I get the bounds of the map and call an ajax function with the bounds as parameter<BR>
3. I retrieve the new geojson with the points of that area and draw the into the map<BR>
<BR>
I need to do this in order to increase the number of features available in the map when the users zoom into a region.<BR>
<BR>
Any example would be great, as I'm starting with openlayers, geodjango and gis systems and It's hard at the beginning :)<BR>
<BR>
Best regards,<BR>
<BR>
Adrian Ribao<BR>
<BR>
</FONT>
</P>

</BODY>
</HTML>