diff options
| author | Étienne Loks <etienne.loks@peacefrogs.net> | 2010-11-16 23:32:52 +0100 |
|---|---|---|
| committer | Étienne Loks <etienne.loks@peacefrogs.net> | 2010-11-16 23:32:52 +0100 |
| commit | aac24a825632ec6198cb830db41700d95e7a7b3b (patch) | |
| tree | eac9fd2a5466884eb5a59434492720fd0e9f5000 /chimere/static/main_map.js | |
| parent | c05b8e6f0181397ce54c8e7c2db14513c001572e (diff) | |
| parent | 98b2ff68d82090bc0ec951a499580a682e4adff3 (diff) | |
| download | Chimère-aac24a825632ec6198cb830db41700d95e7a7b3b.tar.bz2 Chimère-aac24a825632ec6198cb830db41700d95e7a7b3b.zip | |
Merge branch 'v1.0'
Diffstat (limited to 'chimere/static/main_map.js')
| -rw-r--r-- | chimere/static/main_map.js | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/chimere/static/main_map.js b/chimere/static/main_map.js index 9b8b4c6..cd770ae 100644 --- a/chimere/static/main_map.js +++ b/chimere/static/main_map.js @@ -462,35 +462,6 @@ function createParams(center, zoom, layers) { return params; } -var tiny_url = ''; -var redirect_url = ''; - -function processTinyUrl(url, current_feature_id){ - redirect_url = url; - var uri = extra_url + "getTinyUrl/"; - var params = OpenLayers.Util.getParameterString(this.createParams()); - if (current_feature_id && params.indexOf('current_feature') < 0){ - uri += 'current_feature=' + current_feature_id + '&'; - } - uri += params; - OpenLayers.loadURL(uri, '', this, getTinyfiedUrl); -} - -/* get a tiny url */ -function getTinyfiedUrl(response){ - tiny_url = ''; - if (response.responseText.indexOf('no results') == -1) { - var json = new OpenLayers.Format.JSON(); - var result = json.read(response.responseText); - tiny_url = result.url; - if (!redirect_url || !tiny_url) return; - redirect_url = redirect_url.replace('URL', tiny_url); - redirect_url = redirect_url.replace('TEXT', result.text); - window.open(redirect_url); - } -} - - /* main initialisation function */ function init(){ /* set the main map */ |
