On Wednesday, February 9, 2011, Andreas Neumann <[email protected]> wrote:
> Hi,
>
> I would like to create an OpenLayers map, where I set the max extent, and 
> have it initially zoomed to the max extent (or maxscale).
>
> Are there any options that I can set like an initial extent or initial zoom 
> level or initial scale? Currently it just zooms to some scale or extent in 
> between min and max scale, not to the max.
>
> I know that I can use .zoomToMaxExtent() after the map was created, but this 
> way it would lead to two WMS requests, and I would want to avoid the first 
> one.

You shouldn't see two requests.


>
> Here are my options:
>
> var extent = new OpenLayers.Bounds(693000,241000,700000,249000);
> var MapOptions = {
>         projection: new OpenLayers.Projection("EPSG:21781"),
>         units: "m",
>         maxScale:50,
>         minScale:40000,
>         maxExtent: extent,
>         fractionalZoom: true,
>         transitionEffect:"resize",
>         controls: []
> };

Have you tried "extent: extent" in the map options?



-- 
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : [email protected]
http://www.camptocamp.com
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to