summaryrefslogtreecommitdiff
path: root/chimere/static/main_map.js
diff options
context:
space:
mode:
authoretienne <etienne@9215b0d5-fb2c-4bbd-8d3e-bd2e9090e864>2010-04-05 18:38:21 +0000
committeretienne <etienne@9215b0d5-fb2c-4bbd-8d3e-bd2e9090e864>2010-04-05 18:38:21 +0000
commit5f6363cbb2a499ef5009efbe26d9a3b6fc6e16b2 (patch)
treea5cb0ee5ae3187eef0c8c9280bc1b11691452202 /chimere/static/main_map.js
parent04371d1191f094eb6a2e1c16a37fe2f6a590ee36 (diff)
downloadChimère-5f6363cbb2a499ef5009efbe26d9a3b6fc6e16b2.tar.bz2
Chimère-5f6363cbb2a499ef5009efbe26d9a3b6fc6e16b2.zip
Add the current selected item to the permalink - #92
git-svn-id: http://www.peacefrogs.net/svn/chimere/trunk@76 9215b0d5-fb2c-4bbd-8d3e-bd2e9090e864
Diffstat (limited to 'chimere/static/main_map.js')
-rw-r--r--chimere/static/main_map.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/chimere/static/main_map.js b/chimere/static/main_map.js
index fb736f5..792021c 100644
--- a/chimere/static/main_map.js
+++ b/chimere/static/main_map.js
@@ -136,6 +136,7 @@ function showPop(feature) {
currentPopup = feature.popup;
/* hide on click on the cloud */
currentPopup.groupDiv.onclick = hidePopUp;
+ permalink.updateLink();
}
/* check checked categories */
@@ -362,6 +363,13 @@ function putMarker(layer, mark) {
marker.events.register('mouseover', feature, markerOver);
marker.events.register('mouseout', feature, markerOut);
layer.addMarker(marker);
+ /* show the item when designed in the permalink */
+ if (p_current_feature == feature.pk){
+ showPop(feature);
+ clicked = true;
+ updateDetail(feature.pk);
+ p_current_feature = null;
+ }
return feature;
}
@@ -452,6 +460,9 @@ function createParams(center, zoom, layers) {
/* only piece of code added */
params.checked_categories = checked_categories;
params.display_submited = display_submited;
+ if(currentFeature){
+ params.current_feature = currentFeature.pk;
+ }
}
return params;
}