diff options
author | etienne <etienne@9215b0d5-fb2c-4bbd-8d3e-bd2e9090e864> | 2009-01-20 22:23:15 +0000 |
---|---|---|
committer | etienne <etienne@9215b0d5-fb2c-4bbd-8d3e-bd2e9090e864> | 2009-01-20 22:23:15 +0000 |
commit | 91a96b5435f79c8fe390b24b22ad5d63a41d29d3 (patch) | |
tree | 9e1f10f92a9e3bb0a6563f170e1c72ac20eeefe6 /static/main_map.js | |
parent | 6221a562642f80c7de0bc3e406b551528f45d06a (diff) | |
download | Chimère-91a96b5435f79c8fe390b24b22ad5d63a41d29d3.tar.bz2 Chimère-91a96b5435f79c8fe390b24b22ad5d63a41d29d3.zip |
Areas to easily to zoom at - main map
git-svn-id: http://www.peacefrogs.net/svn/chimere/trunk@22 9215b0d5-fb2c-4bbd-8d3e-bd2e9090e864
Diffstat (limited to 'static/main_map.js')
-rw-r--r-- | static/main_map.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/static/main_map.js b/static/main_map.js index 5305495..d803025 100644 --- a/static/main_map.js +++ b/static/main_map.js @@ -105,6 +105,12 @@ function loadLayersFromJSON(layer_markers, layer_vectors, geo_objects){ } } +/* zoom to an area */ +function zoomToArea(top, left, bottom, right){ + var bounds = new OpenLayers.Bounds(left, bottom, right, top); + map.zoomToExtent(bounds, true); +} + /* zoom to a desired category */ function zoomToCategory(categorie_ids){ updateCheckedCategories(); |