[Mapserver-users] default extent
Steve Lime
steve.lime at dnr.state.mn.us
Fri Mar 21 14:17:35 PST 2003
Who wrote that documentation? It's wrong so it was probably me... ;-)
The extent given in the map file IS the default extent. So, if you
access the application and don't specifiy and extent (via a myriad of
means) then that value will be used. There is no magic way to create it
in absence of setting it. The default is something like -1,-1,-1,-1 and
the scale computation code checks for a degenerate extent and reports
the error you mention.
The code *should* (in absence of an extent) examine all layers and come
up with a minimum bounding box. You can add this as a feature request to
bugzilla but it's not a high priority... Interestingly the tool (i.e.
msLayerGetExtent() function) to get that value has already been written
and just needs to be hooked up in the CGI version and perhaps as a
method for MapScript (eg. $map->setDefaultExtent();).
Steve
Stephen Lime
Data & Applications Manager
Minnesota DNR
500 Lafayette Road
St. Paul, MN 55155
651-297-2937
>>> Jan Hartmann <jhart at frw.uva.nl> 03/21/03 10:04AM >>>
The MS3.7 MapFile doc says under the MAP heading:
-------------------------------------
EXTENT [minx] [miny] [maxx] [maxy]
The spatial extent of the map to be created. Most often you will
want to specify this, although mapserver will extrapolate one if none
is
specified.
---------------------------------------
It would be nice if EXTENT had some sort of default, but I always get
an
error-message when I don't specify it:
(msCalculateScale(): General error message. Invalid image extent).
What exactly does this mean?
Jan
_______________________________________________
Mapserver-users mailing list
Mapserver-users at lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
More information about the MapServer-users
mailing list