[mapserver-users] Dynamic shapepaths
Ethan Gruber
ewg4xuva at gmail.com
Mon Aug 17 08:59:45 PDT 2009
Hi,
I'm working on migrating a ten year old mapserver project to the current
version of mapserver on a new system. It involves a lot of changes in
scripts and querying parameters to synchronize with mapserver 5.4.2. I've
run into an issue where the shapepath is generated dynamically with a perl
script. A call to mapserver (it was version 4.x at the time) passes a
parameter called map_shapepath, and map_shapepath is equal to the
dynamically generated path.
In the .map file for the project, the SHAPEPATH variable in MAP is commented
out. I read that in the current version, if SHAPEPATH is not defined, the
default is the folder that the .map file currently resides in. Indeed,
mapserver is unable to find the .shp file within the same folder as the .map
file. Here is my error:
"msDrawMap(): Image handling error. Failed to draw layer named 'theme'.
msShapefileOpen(): Unable to access file.
(/var/www/html/mapservr/HUSCO/histcen.shp) msShapefileOpen(): Unable to
access file. (/var/www/html/mapservr/HUSCO/histcen.shp)"
If I uncomment SHAPEPATH and define path that actually contains a proper
shapefile, the script presumably works (because it moves to the next error,
which is related to the template.html).
So my question is: how can I define the shapepath dynamically with a
parameter passed through the browser? Has the "map_shapepath" param simply
changed names to something else? I can't find any documentation on this.
Thanks!
Ethan Gruber
University of Virginia Library
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20090817/070f1f34/attachment.htm>
More information about the MapServer-users
mailing list