diff options
Diffstat (limited to 'gmap_arcgis.js')
-rw-r--r-- | gmap_arcgis.js | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/gmap_arcgis.js b/gmap_arcgis.js index 1dfd329..5a52859 100644 --- a/gmap_arcgis.js +++ b/gmap_arcgis.js @@ -392,18 +392,30 @@ 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'; - // Max is the number of layers in the service - $(element).slider({ - value: 1, - min: -1, - max: 11, - step: 1, - animate: true, - change: function(event, ui) { - self.sliderUpdate.apply(self, [ ui.value, slider ]); - }, - }); + if (type == 'selectToUISlider') { + $(element).selectToUISlider({ + sliderOptions: { + slide: function(event, ui) { + self.sliderUpdate.apply(self, [ ui.value, slider ]); + } + } + }).hide(); + } + else { + // Max is the number of layers in the service + $(element).slider({ + value: 1, + min: -1, + max: 11, + step: 1, + animate: true, + change: function(event, ui) { + self.sliderUpdate.apply(self, [ ui.value, slider ]); + }, + }); + } }, /** |