aboutsummaryrefslogtreecommitdiff
path: root/gmap_arcgis.js
diff options
context:
space:
mode:
Diffstat (limited to 'gmap_arcgis.js')
-rw-r--r--gmap_arcgis.js16
1 files changed, 10 insertions, 6 deletions
diff --git a/gmap_arcgis.js b/gmap_arcgis.js
index 054c8c7..469a04d 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 ]);