From 91a96b5435f79c8fe390b24b22ad5d63a41d29d3 Mon Sep 17 00:00:00 2001 From: etienne Date: Tue, 20 Jan 2009 22:23:15 +0000 Subject: Areas to easily to zoom at - main map git-svn-id: http://www.peacefrogs.net/svn/chimere/trunk@22 9215b0d5-fb2c-4bbd-8d3e-bd2e9090e864 --- static/base.js | 2 +- static/main_map.js | 6 ++++++ static/styles.css | 27 +++++++++++++++++++++++++++ 3 files changed, 34 insertions(+), 1 deletion(-) (limited to 'static') diff --git a/static/base.js b/static/base.js index 3c7c575..cabdf2a 100644 --- a/static/base.js +++ b/static/base.js @@ -60,4 +60,4 @@ function zoomToCurrentExtent(map){ else{ return; } -} +} \ No newline at end of file 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(); diff --git a/static/styles.css b/static/styles.css index 3f775cb..225d537 100644 --- a/static/styles.css +++ b/static/styles.css @@ -113,6 +113,33 @@ opacity:0.8; border-radius:10px; } +#areas{ +padding:6px; +border: 1px solid black; +height:120px; +position:absolute; +z-index:5; +bottom:100px; +left:18px; +width:200px; +background-color:#FFF; +opacity:0.8; +-moz-border-radius:10px; +-webkit-border-radius:10px; +border-radius:10px; +} + +#areas ul{ +margin:0; +padding:0; +overflow:auto; +height:180px; +} + +#areas li{ +list-style:none; +} + #popup_link{ text-align:center; } -- cgit v1.2.3