Add your control after the call to zoomToMaxExtent.
Best regards,
Bart
On Apr 28, 2010, at 2:34 PM, Jan wrote:
> var map, scalebar;
>
> function init(){
>
> map = new OpenLayers.Map('map');
> var layer = new OpenLayers.Layer.WMS(
>
> "OpenLayers WMS",
> "http://labs.metacarta.com/wms/vmap0",
> {layers: 'basic'}
> );
>
> map.addLayer(layer);
>
> var scalebar = new OpenLayers.Control.ScaleLine({
> geodesic: true
> });
>
> map.addControl(scalebar);
>
> map.zoomToMaxExtent();
>
> }
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users