[mapserver-users] How to open a new window for print layout

Steve Lime Steve.Lime at dnr.state.mn.us
Fri Jan 16 13:30:26 EST 2009


Here's an older templated application that does this. It uses the current map extent
and layers to make another call to MapServer that changes the output template. Click
on the print button so see how it works. It's complete trial and error though to make
it fit on one sheet of paper.

  http://www.dnr.state.mn.us/maps/animap/mapper.html?map=ANIMAP_MAPFILE&imgext=125105.727952+4680758.883785+788393.592828+5593403.088840&imgxy=200.0+275.0&zoomsize=3&zoomdir=0&mode=browse&layers=all&type=mammals&property=cname&species=TAXTAX&queryby=base_geography&geography=county&place=&placetype=any

This is MapServer 4.6 wrapped in our content management system which functions
as a proxy.

Steve

>>> On 1/16/2009 at 12:15 PM, in message
<1232129750495-2169826.post at n2.nabble.com>, boesiii <boesiii at yahoo.com>
wrote:

> I have a working MapServer application and would like to add a button
> somewhere on the page that will open a new window just for printing
> purposes, it doesn't need layers control, zooms or pan.  How do I grab the
> current map extent and scale and put it in a new window.  The new window
> will be setup so that it will fit nicely onto a 8 1/2" x 11" paper.  Also, I
> don't know anything about php or javascript.
> 
> Thanks,
> Ed



More information about the mapserver-users mailing list