diff options
author | Silvio <silvio@socioambiental.org> | 2014-06-04 18:06:45 -0300 |
---|---|---|
committer | Silvio <silvio@socioambiental.org> | 2014-06-04 18:06:45 -0300 |
commit | 2d894c875d30841bdd666ffe6df3efc494973097 (patch) | |
tree | 469b09c20363977ff639f14e25e43dfb3d9032bb | |
parent | b0223a630fdd55c8cc4cfd6557e4b3ad023b2b63 (diff) | |
download | gmap_arcgis_js-2d894c875d30841bdd666ffe6df3efc494973097.tar.gz gmap_arcgis_js-2d894c875d30841bdd666ffe6df3efc494973097.tar.bz2 |
Configurable slider values
-rw-r--r-- | gmap_arcgis.js | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/gmap_arcgis.js b/gmap_arcgis.js index abdbb64..38bcc68 100644 --- a/gmap_arcgis.js +++ b/gmap_arcgis.js @@ -478,8 +478,12 @@ function gmapArcgis(config) { // jQuery slider wrapper slider: function(element, slider) { - var self = this; - var type = (self.config.sliders[slider].type != undefined) ? self.config.sliders[slider].type : 'slider'; + var self = this; + var type = (self.config.sliders[slider].type != undefined) ? self.config.sliders[slider].type : 'slider'; + var value = (self.config.sliders[slider].value != undefined) ? self.config.sliders[slider].value : 1; + var min = (self.config.sliders[slider].min != undefined) ? self.config.sliders[slider].min : 1; + var max = (self.config.sliders[slider].max != undefined) ? self.config.sliders[slider].max : 1; + var step = (self.config.sliders[slider].step != undefined) ? self.config.sliders[slider].step : 1; if (type == 'selectToUISlider') { $(element).selectToUISlider({ @@ -493,10 +497,10 @@ function gmapArcgis(config) { else { // Max is the number of layers in the service $(element).slider({ - value: 1, - min: -1, - max: 11, - step: 1, + value: value, + min: min, + max: max, + step: step, animate: true, change: function(event, ui) { self.sliderUpdate.apply(self, [ ui.value, slider ]); |