改变OpenLayers缩放工具条位置以及大小

   <script type="text/javascript">
        var map, layer;
        function init(){
            map = new OpenLayers.Map( 'map' );
            layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
                    "http://vmap0.tiles.osgeo.org/wms/vmap0",
                    {layers: 'basic'} );
            map.addLayer(layer);
			map.numZoomLevels =13;
            map.zoomToMaxExtent();
			map.addControl(new OpenLayers.Control.LayerSwitcher());
			map.addControl(new OpenLayers.Control.ZoomPanel());
			map.addControl(new OpenLayers.Control.PanZoomBar({'position':new OpenLayers.Pixel(50, 0), 'zoomStopHeight':5}));
        }
    </script>

 

转载自:https://blog.csdn.net/iteye_11116/article/details/82573970

You may also like...