[OpenLayers-Users] scaleline in lon/lat projection
Bart van den Eijnden
bartvde at osgis.nl
Wed Apr 28 08:47:57 EDT 2010
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();
>
> }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100428/88cedb7e/attachment.html
More information about the Users
mailing list