Behaviour of 'loadMapContext()'

Armin Burger armin.burger at GMX.NET
Tue Oct 4 11:02:13 PDT 2005


I have a question to the behaviour of the Mapscript function
$map->loadMapContext()

The Map Context XML has a mandatory entry "<BoundingBox />". When I use
a map that has eg. a projection like Lambert Equal Area Azimuthal and I 
load a context file where the specified <BoundingBox /> is

<BoundingBox SRS="EPSG:4326" minx="-31.2657" miny="32.3975"
maxx="69.0703" maxy="81.8574"/>

and the SRS for the layers is

<SRS>EPSG:4326</SRS>

then the map will automatically be reprojected to the SRS set in the
<BoundingBox /> of the loaded Map Context file. Also the map size
changes from the original settings to the ones specified in the context
file under <Window /> and the map extent is set to the values of
<BoundingBox />.

Why is this behaviour intended to be like that? If one omits the
<BoundingBox /> then the WMS layers are loaded to the map but the
original projection is kept. But a context file without it is not
correct according to the context schema.

Ok, I can reset the map parameters after loading the context file to the
original settings.

Armin



More information about the MapServer-users mailing list