dbox print function
Sam Young
samnyoung at HOTMAIL.COM
Wed Dec 13 14:22:10 PST 2006
I am trying to add a print function to my dbox application and I don't know
how to get the map image to show up in the new window I am creating.
This is my print function:
<script language="JavaScript">
function printmap() {
var w = window.open();
var d = w.document;
d.open();
d.write("<h3>Printable Map</h3>");
d.write("<img name=\"scalebar_miles\" src=\"" + ms.mapserver + "?map=" +
config.mapfile
+ "&mode=scalebar&mapext=0+0+" + (ms.extent[2] - ms.extent[0]) + "+" +
(ms.extent[3] - ms.extent[1]) + "&mapsize="
+ ms.width + "+" + ms.height + "\" border=\"0\">");
d.write("<img id=\"main\" src=\"../graphics/white_pixel.gif\" height=\"" +
mapsizey + "\" width=\"" + mapsizex + "\">");
d.close();
}
</script>
I added this to the tools to access the function:
<a href="javascript:printmap()" >
<img src="/graphics/print_icon.gif" width="30" height="30" border="0"
alt="print" /></a>
Thanks for the help.
Sam
_________________________________________________________________
View Athletes Collections with Live Search
http://sportmaps.live.com/index.html?source=hmemailtaglinenov06&FORM=MGAC01
More information about the MapServer-users
mailing list