Use OSM resolutions as fallback resolutions.

Hat tip to @twpayne for suggesting this change in the defaults.
This commit is contained in:
Marc Jansen
2013-03-12 16:08:18 +01:00
parent f496471273
commit ce67625b20
2 changed files with 12 additions and 7 deletions

View File

@@ -123,20 +123,22 @@ ol.control.ZoomSlider.CSS_CLASS_THUMB =
/**
* The default value for minResolution_ when the control isn't instanciated with
* an explicit value.
* an explicit value. The default value is the resolution of the standard OSM
* tiles at zoomlevel 18.
*
* @const {number}
*/
ol.control.ZoomSlider.DEFAULT_MIN_RESOLUTION = 500;
ol.control.ZoomSlider.DEFAULT_MIN_RESOLUTION = 0.5971642833948135;
/**
* The default value for maxResolution_ when the control isn't instanciated with
* an explicit value.
* an explicit value. The default value is the resolution of the standard OSM
* tiles at zoomlevel 0.
*
* @const {number}
*/
ol.control.ZoomSlider.DEFAULT_MAX_RESOLUTION = 1000000;
ol.control.ZoomSlider.DEFAULT_MAX_RESOLUTION = 156543.0339;
/**