Adding support for fractional zoom to the pan zoom bar. Setting map.fractionalZoom to true allows you to access a continuous range of resolutions with the pan zoom bar. r=crschmidt,me (closes #1288)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6331 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -13,7 +13,10 @@
|
||||
var map;
|
||||
|
||||
function init() {
|
||||
map = new OpenLayers.Map('map');
|
||||
map = new OpenLayers.Map('map',
|
||||
{controls: [new OpenLayers.Control.Navigation(),
|
||||
new OpenLayers.Control.PanZoomBar()],
|
||||
numZoomLevels: 10 });
|
||||
var wms = new OpenLayers.Layer.WMS(
|
||||
"OpenLayers WMS",
|
||||
"http://labs.metacarta.com/wms/vmap0",
|
||||
@@ -22,7 +25,6 @@
|
||||
map.addLayers([wms]);
|
||||
|
||||
map.events.register("moveend", null, displayZoom);
|
||||
map.addControl( new OpenLayers.Control.LayerSwitcher() );
|
||||
|
||||
map.zoomToMaxExtent();
|
||||
|
||||
@@ -36,6 +38,7 @@
|
||||
|
||||
function update(input) {
|
||||
map.fractionalZoom = input.checked;
|
||||
map.zoomTo(Math.round(map.zoom));
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
||||
Reference in New Issue
Block a user