correct geo request on js side
authorcavaliet
Mon, 30 Jun 2014 12:47:35 +0200
changeset 287 1235aa03159f
parent 286 5e98984bbfc9
child 288 0bb9c29cd41d
correct geo request on js side
src/hdalab/static/hdalab/js/gomina.js
--- a/src/hdalab/static/hdalab/js/gomina.js	Thu Jun 26 15:41:02 2014 +0200
+++ b/src/hdalab/static/hdalab/js/gomina.js	Mon Jun 30 12:47:35 2014 +0200
@@ -143,7 +143,7 @@
             _params.label = _curView.tag.join(',');
         }
         if (_curView.country.length) {
-            _params.country = _curView.country.join(',');
+            _params.country = decodeURIComponent(_curView.country.join(','));
         }
         $.getJSON(gomNs.urls['filter'], _params, updateDisplay);
         animLoad();
@@ -430,6 +430,7 @@
     if (gomNs.countries && data.countries) {
         var _max = Math.max(1, _(data.countries).max());
         _(gomNs.countries).each(function(_country, _k) {
+            _k = decodeURIComponent(_k);
             var _val = data.countries[_k] || 0,
                 _fill = getGradient(_val/_max);
             switch(gomNs.mappingLibrary) {