[Mapserver-users] Printing Template w/ MapServer

Delfos, Jacob jacob.delfos at maunsell.com
Thu May 20 23:34:02 EDT 2004

By the way, check http://spatial.hgm.com.au/cwcroe7/cwc2.php to see it in
action. Let me know if you have any questions.

-----Original Message-----
From: Jerod Clabaugh [mailto:jclabaugh at mac.com] 
Sent: Friday, 21 May 2004 12:16 PM
To: mapserver-users at lists.gis.umn.edu
Subject: [Mapserver-users] Printing Template w/ MapServer


I am trying to develop a template to allow the user to print the 
current view of a map, with the legend, all selected layers, scalebar 

I tried to mimic the print function from the MN DNR Recreational 
Compass site (http://www.dnr.state.mn.us/maps/compass.html) by 
picking through the source code 

Does anyone know an easy way to pass the existing map, legend and 
scalebar from a mapserver page to another page without using a 
scripting language such as PHP.

I am passing this URL string:


class="showline">Print Map View</a>

to the print.html page with the following code in it:

<img border="2" src="[img]">
<br /><br />
<img border="2" src="[legend]">
<br /><br />
<img src="[scalebar]"><br>
<b>Map Parameters</b> (UTM Zone 16, NAD27)</font><br>
  <i>minx:</i> [minx]<br />
<i>maxx:</i> [maxx]<br />
<i>miny:</i> [miny]<br />
<i>maxy:</i> [maxy]<br />
<img src="[ref]">

but only minx, miny, maxx, maxy are pass correctly to the print.html 
page ... the [img], [legend] and [scalebar] paths passed between the 
URL and the print.html page are absolute paths (i.e, map image is 
passed as /Library/Apache2/htdocs/tmp/BELIZE_0987765554.png (which 
Apache won't display) when I want it to just show 
/tmp/BELIZE_0987765554.png (which Apache would display).  I also 
tried passing [map_web_imageurl] but that produced the same result.

Any advice would be greatly appreciated,


Jerod Clabaugh

Mapserver-users mailing list
Mapserver-users at lists.gis.umn.edu

More information about the mapserver-users mailing list