[OpenLayers-Users] How can I get the bounds of the map when
zooming?
Heidt, Christopher M.
CHRISTOPHER.M.HEIDT at saic.com
Sat Sep 5 19:01:44 EDT 2009
http://dev.openlayers.org/releases/OpenLayers-2.8/doc/apidocs/files/OpenLayers/Map-js.html#OpenLayers.Map.getExtent
-----Original Message-----
From: users-bounces at openlayers.org on behalf of Adrián Ribao Martínez
Sent: Sat 9/5/2009 5:32 AM
To: users at openlayers.org
Subject: [OpenLayers-Users] How can I get the bounds of the map when zooming?
Hello,
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.
Can this be done? Where can I find examples and docs about this?
I think it would work like this:
1. Load the map with some features
2. The user zooms in a region
3. I get the bounds of the map and call an ajax function with the bounds as parameter
3. I retrieve the new geojson with the points of that area and draw the into the map
I need to do this in order to increase the number of features available in the map when the users zoom into a region.
Any example would be great, as I'm starting with openlayers, geodjango and gis systems and It's hard at the beginning :)
Best regards,
Adrian Ribao
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090905/a62d65ef/attachment.html
More information about the Users
mailing list