<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><BR><DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite">Hi Lorenzo,<BR></BLOCKQUOTE><DIV><BR class="khtml-block-placeholder"></DIV><DIV>hi Donal,</DIV><BR><BLOCKQUOTE type="cite"><BR>Thanks for your e-mail.<BR><BR>I am sorry, the strange changes you mention below are because I sent you an old copy of print_map.php. I thought I was editing the most recent version of print_map.php. The only changes that I delibarately made were the ones concerning the opacity. Sorry for my mistake.<BR></BLOCKQUOTE><DIV><BR class="khtml-block-placeholder"></DIV><DIV>No problem at all.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><BR><BLOCKQUOTE type="cite"><BR>I will have a look at the issue you raise with respect to the order of the layers.<BR></BLOCKQUOTE><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>thanks it will be great to include this feature too.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>let us know</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>ciao</DIV><DIV>Lorenzo</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><BLOCKQUOTE type="cite"><BR><BR><BR><B><I>Lorenzo Becchi <<A href="mailto:lorenzo@ominiverdi.com">lorenzo@ominiverdi.com</A>></I></B> wrote:<BLOCKQUOTE class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> Donal thanks for your code. I've put it on CVS but with some changes.<DIV><BR class="khtml-block-placeholder"></DIV><DIV>Why have you changed this line?</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV style="margin: 0px;"><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">header("Content-Disposition: attachment; filename=\"".$oMap->name.".tiff\"");</SPAN></FONT></DIV><DIV style="margin: 0px; min-height: 14px;"><SPAN class="Apple-tab-span" style="white-space: pre;"> </SPAN><BR>in this:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV style="margin: 0px;"><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">header("Content-Disposition: attachment; filename=".$oMap->name.".tiff");</SPAN></FONT></DIV><DIV style="margin: 0px; min-height: 14px;"><SPAN class="Apple-tab-span" style="white-space: pre;"> </SPAN><BR>and why this:</DIV><DIV style="margin: 0px; min-height: 14px;"><BR class="khtml-block-placeholder"></DIV><DIV style="margin: 0px;"><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">header("Content-Disposition: attachment; filename=\"".$oMap->name.".".strtolower($_REQUEST['output_type'])."\"");</SPAN></FONT></DIV><DIV style="margin: 0px; min-height: 14px;"><SPAN class="Apple-tab-span" style="white-space: pre;"> </SPAN><BR class="khtml-block-placeholder"></DIV><DIV style="margin: 0px; min-height: 14px;"><BR>in this:</DIV><DIV style="margin: 0px; min-height: 14px;"><BR class="khtml-block-placeholder"></DIV><DIV style="margin: 0px;"><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">header("Content-Disposition: attachment; filename=".$oMap->name.".".$_REQUEST['output_type']);</SPAN></FONT></DIV><DIV style="margin: 0px; min-height: 14px;"><SPAN class="Apple-tab-span" style="white-space: pre;"> </SPAN><BR><SPAN class="Apple-style-span" style="white-space: pre;"><SPAN class="Apple-style-span" style="white-space: normal;"><BR class="khtml-block-placeholder"></SPAN></SPAN> </DIV><DIV style="margin: 0px; min-height: 14px;">All that strange syntax was granting some compatibility with filenames with all browsers in windows and mac.</DIV><DIV style="margin: 0px; min-height: 14px;">I suggest you to put it on again.</DIV><DIV style="margin: 0px; min-height: 14px;"><BR class="khtml-block-placeholder"></DIV><DIV style="margin: 0px; min-height: 14px;">and why did you skipped </DIV><DIV style="margin: 0px; min-height: 14px;"><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">location.href=</SPAN></FONT><FONT class="Apple-style-span" color="#2a00ff" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">'tools/print/print_map.php?'</SPAN></FONT><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">+params;</SPAN></FONT></DIV><DIV style="margin: 0px; min-height: 14px;"><FONT class="Apple-style-span" face="Monaco" size="3"><SPAN class="Apple-style-span" style="font-size: 11px;">using the old winOpener ?</SPAN></FONT></DIV><DIV style="margin: 0px; min-height: 14px;"><BR class="khtml-block-placeholder"></DIV><DIV style="margin: 0px; min-height: 14px;">I know there's not a perfect solution, I'm interested in your opinion.</DIV><DIV style="margin: 0px; min-height: 14px;"><BR class="khtml-block-placeholder"></DIV><DIV style="margin: 0px; min-height: 14px;">Testing the new solution I've found another limitation of my code: if you move layers up and down the printed map is maintaining the orginal disposition.</DIV><DIV style="margin: 0px; min-height: 14px;">This means looping layers inside a new loop of "group" array caching correspondences.</DIV><DIV style="margin: 0px; min-height: 14px;"><SPAN class="Apple-tab-span" style="white-space: pre;"></SPAN>Do you want to do this too?<BR></DIV><DIV style="margin: 0px; min-height: 14px;"><BR class="khtml-block-placeholder"></DIV><DIV style="margin: 0px; min-height: 14px;">I've put your name in the code. Update from CVS.</DIV><DIV style="margin: 0px; min-height: 14px;"><BR class="khtml-block-placeholder"></DIV><DIV style="margin: 0px; min-height: 14px;">ciao </DIV><DIV style="margin: 0px; min-height: 14px;">Lorenzo</DIV><DIV style="margin: 0px; min-height: 14px;"><BR class="khtml-block-placeholder"></DIV><DIV style="margin: 0px; min-height: 14px;">ps: please if you don't want to use a line of code leave it commented in your new code so I can understand quickly what you've change without looking for diffs.</DIV><DIV style="margin: 0px; min-height: 14px;"><BR class="khtml-block-placeholder"></DIV><DIV style="margin: 0px; min-height: 14px;"><BR class="khtml-block-placeholder"></DIV><DIV style="margin: 0px; min-height: 14px;"><BR class="khtml-block-placeholder"></DIV><DIV style="margin: 0px; min-height: 14px;"><BR class="khtml-block-placeholder"></DIV><DIV style="margin: 0px; min-height: 14px;"><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR><DIV><DIV>On 01/set/06, at 04:13, Donal Regan wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite">Lorenzo, <BR><BR>I have attached a copy of print_map.php that now takes into account layer opacity. The changes to the javascript function myPrint() are shown down below.<BR>I took on board what you suggested so print_map.php now checks for opacitys in the querystring:<BR><BR><BR>if (isset($_REQUEST['opacitys']))$opacitys=$_REQUEST['opacitys'];<BR>else $opacitys="";<BR>$aOpacity=explode(',',$opacitys);<BR><BR><BR>and while looping through the layers we can now do the following<BR><BR>elseif (in_array($oLayer->group,$aGroup)){<BR> $oLayer->set('status',MS_ON);<BR> $opacity = $aOpacity[array_search($oLayer->group,$aGroup)];<BR> if($opacity!='')$oLayer->set('transparency',$opacity);<BR> if(!$oLayer->isVisible() && ($oLayer->minscale < $scale && $oLayer->maxscale > $scale )){<BR> $oLayer->set("minscale",0);<BR> $oLayer->set("maxscale",(200000000)); // has to be greater that map maximum scale<BR> }<BR> }<BR><BR>The myPrint() function should now look like the following<BR><BR>function myPrint() {<BR> var szLayers = '';<BR> var szOpacitys = '';<BR> <BR> var layers = myKaMap.getCurrentMap().getLayers();<BR> for (var i=0;i<layers.length;i++) {<BR> szLayers = szLayers + "," + layers[i].name;<BR> szOpacitys = szOpacitys + "," + layers[i].opacity;<BR> }<BR><BR> var extent = myKaMap.getGeoExtents();<BR> var scale = myKaMap.getCurrentScale();<BR> var cMap = myKaMap.getCurrentMap().name;<BR> <BR> var img_width = '600';// pixel dimension. max_img_width set inside print_map.php<BR> var params='map='+cMap+'&scale='+scale+'&img_width='+img_width+'&groups='+szLayers+"&opacitys="+szOpacitys+'&extent='+extent[0]+'|'+extent[1]+'|'+extent[2]+'|'+extent[3];<BR><BR> WOOpenWin( 'Print', '../tools/print/print_map.php?'+params, 'resizable=yes,scrollbars=yes,width=600,height=400' );<BR><BR>}<BR><BR><BR>The code works for me on Windows 2000, IE6 and Firefox 1.5.06.<BR><BR>Cheers.</BLOCKQUOTE></DIV></DIV></BLOCKQUOTE><BR><DIV>                 <BR class="khtml-block-placeholder"></DIV><HR size="1"> The <A href="http://us.rd.yahoo.com/mail/uk/taglines/default/nowyoucan/free_from_isp/*http://us.rd.yahoo.com/evt=40565/*http://uk.docs.yahoo.com/nowyoucan.html">all-new Yahoo! Mail</A> goes wherever you go - free your email address from your Internet provider.</BLOCKQUOTE></DIV><BR></BODY></HTML>