diff options
Diffstat (limited to 'static/main_map.js')
-rw-r--r-- | static/main_map.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/static/main_map.js b/static/main_map.js index 7a9e070..bf69a9a 100644 --- a/static/main_map.js +++ b/static/main_map.js @@ -296,6 +296,21 @@ function setDetail(response){ } } +/* show the detail of a category */ +function displayCategoryDetail(category_id) { + var uri = "/" + extra_url + "getDescriptionDetail/" + category_id; + OpenLayers.loadURL(uri, '', this, setCategoryDetail); +} + +/* update the category detail panel from an http response */ +function setCategoryDetail(response){ + if (response.responseText.indexOf('no results') == -1) { + document.getElementById('category_detail').innerHTML = + response.responseText; + show('category_detail'); + } +} + /* new permalink createParams method - update when facilities are given to personalize the permalink */ function createParams(center, zoom, layers) { |