diff --git a/LeafletOpacityDemo.html b/LeafletOpacityDemo.html
index 1b2de99..84da218 100644
--- a/LeafletOpacityDemo.html
+++ b/LeafletOpacityDemo.html
@@ -58,13 +58,18 @@
});
-
+ var options = {
+ position: "bottomright",
+ max: 1000,
+ animate: "slow",
+ init_opac: 0.5
+ }
//Create the opacity controls
- var higherOpacity = new L.Control.higherOpacity();
+ var higherOpacity = new L.Control.higherOpacity(options);
map.addControl(higherOpacity);
- var lowerOpacity = new L.Control.lowerOpacity();
+ var lowerOpacity = new L.Control.lowerOpacity(options);
map.addControl(lowerOpacity);
- var opacitySlider = new L.Control.opacitySlider();
+ var opacitySlider = new L.Control.opacitySlider(options);
map.addControl(opacitySlider);
//Specify the layer for which you want to modify the opacity. Note that the setOpacityLayer() method applies to all the controls.
@@ -72,7 +77,7 @@
opacitySlider.setOpacityLayer(historic_seattle);
//Set initial opacity to 0.5 (Optional)
- historic_seattle.setOpacity(0.5);
+ historic_seattle.setOpacity(options.init_opac);