<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>
<div>Dear Dante Fuster,</div>

<div> </div>

<div>thank you very much for your help!</div>

<div>What is the "globalgis.php" in your php file?</div>

<div><span id="result_box" lang="en"><span class="hps">Should I</span> <span class="hps">not</span> <span class="hps">also provide</span> <span class="hps">the new service</span> <span class="hps">as a print</span> <span class="hps">service</span> <span class="hps">in the toolbar</span>?</span>

<div>       </div>

<div><tool name="print" title="Karte drucken" type="service" service="print2" selectable="false" icon-class="sprite-control sprite-control-printer"/></div>

<div> </div>

<div>Should I note something else? Because it does not work at the moment.</div>

<div>Thank you in advance for anwering!</div>

<div> </div>

<div>Greetings, Geograefin</div>
</div>

<div> 
<div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><b>Gesendet:</b> Donnerstag, 12. Februar 2015 um 20:59 Uhr<br/>
<b>Von:</b> "Dante Fuster" <dante.fuster@gmail.com><br/>
<b>An:</b> "Brent Fraser" <bfraser@geoanalytic.com><br/>
<b>Cc:</b> geo.graefin@web.de, geomoose-users@lists.osgeo.org<br/>
<b>Betreff:</b> Re: [Geomoose-users] print osm tiles</div>

<div name="quoted-content">
<div>
<div>
<div>
<div>
<div>Hello</div>
I had also  the same problem to print a map with background like googlemaps or OSM,  i dont need  complex print and i resolved to generate a screen with only the content of the map and sending to save (screen capture) to JPG or print directly.<br/>
 </div>
i create a new service:<br/>
--------------------------<br/>
     <service name="print2" display="false"><br/>
        <url>php/print2.php</url><br/>
        <step type='input'>                               <br/>
                <input type="hidden" name="impresion" value="true"/><br/>
        </step><br/>
    </service><br/>
----------------------------</div>
and the print2.php<br/>
<br/>
-----------------------<br/>
<?php<br/>
<br/>
include('config.php');<br/>
include('globalgis.php');<br/>
   <br/>
# Turn off the warning reporting<br/>
error_reporting(E_ERROR | E_PARSE);<br/>
<br/>
//$predicates = array();<br/>
<br/>
# the mode!<br/>
<br/>
    header('Content-type: text/xml');<br/>
?><br/>
    <results><br/>
   <br/>
    <script><![CDATA[<br/>
       <br/>
    var barra = document.getElementById("OpenLayers.Control.PanZoomBar_11");<br/>
  barra.style.display="none";<br/>
  var ficha = document.getElementById("map");<br/>
  params  = 'width='+screen.width;<br/>
  params += ', height='+screen.height;<br/>
  params += ', scrollbars=auto';<br/>
 <br/>
  var ventimp = window.open(' ', 'popimpr',params);<br/>
  ventimp.document.write("<html>");<br/>
  ventimp.document.write("<head>");<br/>
  ventimp.document.write("<script type='text/javascript' src='<a href="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.js" target="_blank">http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.js</a>'></script>"); <br/>
  ventimp.document.write("<script type='text/javascript' src='build/jquery.fullscreen-min.js'></script>");<br/>
  ventimp.document.write("</head>");<br/>
  ventimp.document.write("<body>");<br/>
  ventimp.document.write( ficha.innerHTML );<br/>
  ventimp.document.write("</body>");<br/>
  ventimp.document.write("<html>"); <br/>
    ventimp.document.write("<div id='buttons'>");<br/>
  ventimp.document.write("    <button onclick='$(document).fullScreen(true)' autofocus='autofocus'>F</button>");<br/>
  ventimp.document.write("  </div>");<br/>
  ventimp.document.close();<br/>
 <br/>
<br/>
<br/>
//ventimp.print( );<br/>
<br/>
//  ventimp.close();<br/>
   barra.style.display="";<br/>
   GeoMOOSE.changeTab('catalog');<br/>
    ]]></script><br/>
   <br/>
    <html><![CDATA[<br/>
  ]]><br/>
    </html><br/>
    </results><br/>
--------------------------<br/>
 </div>
or a variation  to print directly<br/>
<br/>
------------------------------<br/>
<?php<br/>
<br/>
include('config.php');<br/>
include('globalgis.php');<br/>
   <br/>
# Turn off the warning reporting<br/>
error_reporting(E_ERROR | E_PARSE);<br/>
<br/>
//$predicates = array();<br/>
<br/>
# the mode!<br/>
<br/>
    header('Content-type: text/xml');<br/>
?><br/>
    <results><br/>
    <script><![CDATA[<br/>
          var barra = document.getElementById("OpenLayers.Control.PanZoomBar_11");<br/>
  barra.style.display="none";<br/>
  var ficha = document.getElementById("map");<br/>
 <br/>
  var ventimp = window.open(' ', 'popimpr');<br/>
  ventimp.document.write( ficha.innerHTML );<br/>
<br/>
  ventimp.document.close();<br/>
ventimp.print( );<br/>
<br/>
  ventimp.close();<br/>
   barra.style.display="";<br/>
    ]]></script><br/>
   <br/>
    <html><![CDATA[<br/>
 <br/>
  ]]><br/>
       <br/>
    </html><br/>
    </results><br/>
   <br/>
---------------------------------
<div>
<div>i hope to help you , is simple and  was the minimum that i needed<br/>
 </div>

<div>Regards<br/>
 </div>

<div>Dante Fuster</div>

<div>
<div>
<div> </div>
</div>
</div>
</div>
</div>

<div class="gmail_extra"> 
<div class="gmail_quote">2015-02-10 11:20 GMT-05:00 Brent Fraser <span><<a href="bfraser@geoanalytic.com" target="_parent">bfraser@geoanalytic.com</a>></span>:

<blockquote class="gmail_quote" style="margin: 0 0 0 0.8ex;border-left: 1.0px rgb(204,204,204) solid;padding-left: 1.0ex;">
<div>
<div>Geograefin,<br/>
<br/>
  I just copied the "frmt_wms_openstreetmap_tms.xml" file into the same folder as the map file and it works fine..  I suspect you could put the full path to the xml file in the DATA object in the map file, but I have not tried it.<br/>
<br/>
  Interestingly, the xml file (along with many others) are delivered with the GDAL source code, but not with the binary distributions I use.  The files are:<br/>
<br/>
frmt_wms_metacarta_tms.xml<br/>
frmt_wms_metacarta_wmsc.xml<br/>
frmt_wms_onearth_global_mosaic.xml<br/>
frmt_wms_openstreetmap_tms.xml<br/>
frmt_wms_tileservice_bmng.xml<br/>
frmt_wms_tileservice_nysdop2004.xml<br/>
<br/>
I may have to try some of these!<br/>
 
<pre>Best Regards,
Brent Fraser</pre>

<div>
<div class="h5">On 2/10/2015 8:42 AM, <a href="geo.graefin@web.de" target="_parent">geo.graefin@web.de</a> wrote:</div>
</div>
</div>

<div>
<div class="h5">
<blockquote>
<div style="font-family: Verdana;font-size: 12.0px;">
<div>
<div><br/>
Hello Brent,</div>

<div> </div>

<div><span><span>I'm sorry</span> <span>to bother</span> <span>you</span> <span>again</span><span>,</span> <span>but I could not</span> <span>find</span> <span>where to</span> <span>store the</span> <span>xml</span> <span>file.</span> <span>How</span> <span>does </span><span>the</span> <span>MapServer interact with</span> <span>GDAL</span><span>?</span></span> Where I have to reference the xml file? Apparently the content of the xml file should look like this one [<a href="http://code.metager.de/source/xref/lib/gdal/frmts/wms/frmt_wms_openstreetmap_tms.xml" target="_blank">http://code.metager.de/source/xref/lib/gdal/frmts/wms/frmt_wms_openstreetmap_tms.xml</a>].</div>

<div>By these instructions [<a href="http://www.gdal.org/frmt_wms.html" target="_blank">http://www.gdal.org/frmt_wms.html</a>] I can not look through.</div>

<div>Thank you very much in advance for answering!</div>

<div> </div>

<div>Greetings, Geograefin</div>

<div>
<div style="margin: 10.0px 5.0px 5.0px 10.0px;padding: 10.0px 0 10.0px 10.0px;border-left: 2.0px solid rgb(195,217,229);">
<div style="margin: 0 0 10.0px 0;"><b>Gesendet:</b> Montag, 09. Februar 2015 um 16:38 Uhr<br/>
<b>Von:</b> "Brent Fraser" <a href="bfraser@geoanalytic.com" target="_parent"><bfraser@geoanalytic.com></a><br/>
<b>An:</b> <a href="geo.graefin@web.de" target="_parent">geo.graefin@web.de</a>, "GeoMOOSE Users List" <a href="geomoose-users@lists.osgeo.org" target="_parent"><geomoose-users@lists.osgeo.org></a><br/>
<b>Betreff:</b> Re: Aw: Re: [Geomoose-users] print osm tiles</div>

<div>
<div style="background-color: rgb(255,255,255);">
<div>Geograefin,<br/>
<br/>
  Check your "frmt_wms_openstreetmap_tms.xml" file is working by using gdal_translate (or gdalinfo) command line program.
<pre>Best Regards,
Brent Fraser</pre>
On 2/9/2015 7:31 AM, <a href="http://geo.graefin@web.de" target="_blank">geo.graefin@web.de</a> wrote:</div>

<blockquote>
<div style="font-family: Verdana;font-size: 12.0px;">
<div> 
<div>
<div>Dear Brent Fraser,</div>

<div> </div>

<div>in addition to the post you listed below, I have created a map file (my_osm.map), to support the printing of osm tiles.</div>

<div> </div>

<div>MAP
<div>    #--------------------------------------------------------------------------------<br/>
    #---------------------------------MAPFILEHEADER----------------------------------<br/>
    #--------------------------------------------------------------------------------<br/>
    NAME 'background'<br/>
    STATUS ON<br/>
    DEBUG 5<br/>
    CONFIG "MS_ERRORFILE" "/ms4w/tmp/ms_error.txt"<br/>
    #EXTENT 1190889 6412149 1987057 6860988<br/>
    #SIZE 100 100<br/>
    #UNITS METERS<br/>
    #IMAGETYPE PNG<br/>
    PROJECTION<br/>
        'init=epsg:3857'     #projection of the map<br/>
    END<br/>
    OUTPUTFORMAT<br/>
        NAME png<br/>
        DRIVER "GD/PNG"<br/>
        MIMETYPE "image/png"<br/>
        IMAGEMODE PC256<br/>
        EXTENSION "png"<br/>
    END    <br/>
    INCLUDE "../../geomoose_globals.map"<br/>
    #--------------------------------------------------------------------------------<br/>
    #-----------------------------------WEB-SECTION----------------------------------<br/>
    #--------------------------------------------------------------------------------<br/>
    WEB<br/>
        IMAGEPATH "/ms4w/tmp/ms_tmp/"<br/>
        IMAGEURL "/ms_tmp/"<br/>
        METADATA<br/>
            WMS_TITLE "open street map"<br/>
            WMS_ABSTRACT "Open Street Map Kacheln"<br/>
            WMS_ONLINERESOURCE "<a href="http://localhost/cgi-bin/mapserv" target="_blank">http://localhost/cgi-bin/mapserv</a>?<br/>
                map=/geomoose2/maps/demo/test/angebote/my_osm.map"<br/>
            WMS_SRS "EPSG:3857"        #projection of the service<br/>
            WMS_ENABLE_REQUEST "*"<br/>
        END<br/>
    END<br/>
    #--------------------------------------------------------------------------------<br/>
    #-------------------------------------LAYER--------------------------------------<br/>
    #--------------------------------------------------------------------------------<br/>
      LAYER<br/>
        NAME 'my_osm'<br/>
        DATA "frmt_wms_openstreetmap_tms.xml"<br/>
        STATUS ON<br/>
        TYPE RASTER<br/>
        PROCESSING "OVERSAMPLE_RATIO=1"<br/>
        PROCESSING "LOAD_FULL_RES_IMAGE=NO"<br/>
        UNITS METERS<br/>
        METADATA<br/>
            WMS_TITLE "open street map tiles"<br/>
        END<br/>
        PROJECTION<br/>
            "proj=merc" "a=6378137" "b=6378137" "lat_ts=0.0" "lon_0=0.0" "x_0=0.0" "y_0=0" "k=1.0" "units=m" "nadgrids=@null" "no_defs"<br/>
        END<br/>
      END<br/>
END     #end map</div>
</div>

<div> </div>

<div>Are the settings correct, the coordinate systems, too?</div>

<div> </div>

<div>And the settings in mapbook.xml are these:</div>

<div> </div>

<div>    <map-source name="background" type="mapserver"><br/>
        <file>./test/angebote/my_osm.map</file><br/>
        <layer name="my_osm" status="on"/><br/>
    </map-source></div>

<div> </div>

<div>
<div>    <layer title="Mein OSM" src="background/my_osm" legend="false" fade="false" unfade="false"/></div>

<div> </div>

<div>I would be very grateful if you could check this! Currently, there is just a white display, when I turn on the layer.</div>

<div>Thank you very much!</div>

<div> </div>

<div>Greetings, Geograefin</div>

<div> </div>
</div>

<div style="margin: 10.0px 5.0px 5.0px 10.0px;padding: 10.0px 0 10.0px 10.0px;border-left: 2.0px solid rgb(195,217,229);">
<div style="margin: 0 0 10.0px 0;"><b>Gesendet:</b> Mittwoch, 04. Februar 2015 um 18:56 Uhr<br/>
<b>Von:</b> "Brent Fraser" <a href="http://bfraser@geoanalytic.com" target="_blank"><bfraser@geoanalytic.com></a><br/>
<b>An:</b> <a href="http://geo.graefin@web.de" target="_blank">geo.graefin@web.de</a>, <a href="http://geomoose-users@lists.osgeo.org" target="_blank">geomoose-users@lists.osgeo.org</a><br/>
<b>Betreff:</b> Re: [Geomoose-users] print osm tiles</div>

<div>
<div style="background-color: rgb(255,255,255);">
<div>There's some info on a work-around:<br/>
<br/>
<a href="http://osgeo-org.1560.x6.nabble.com/Geomoose-users-Printing-tt4928024.html" target="_blank">http://osgeo-org.1560.x6.nabble.com/Geomoose-users-Printing-tt4928024.html</a><br/>
<br/>
but the results are not very good.
<pre>Best Regards,
Brent Fraser</pre>
On 2/4/2015 3:45 AM, <a>geo.graefin@web.de</a> wrote:</div>

<blockquote>
<div style="font-family: Verdana;font-size: 12.0px;">
<div>Hello,</div>

<div> </div>

<div>is there a current solution to print open street map tiles in GeoMOOSE?</div>

<div> </div>

<div>Thank you for your answers!</div>

<div> </div>

<div>Greetings, Geograefin</div>
</div>
 

<fieldset> </fieldset>
 

<pre>_______________________________________________
Geomoose-users mailing list
<a>Geomoose-users@lists.osgeo.org</a>
<a href="http://lists.osgeo.org/mailman/listinfo/geomoose-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/geomoose-users</a></pre>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
<br/>
_______________________________________________<br/>
Geomoose-users mailing list<br/>
<a href="Geomoose-users@lists.osgeo.org" target="_parent">Geomoose-users@lists.osgeo.org</a><br/>
<a href="http://lists.osgeo.org/mailman/listinfo/geomoose-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/geomoose-users</a></blockquote>
</div>
</div>
</div>
</div>
</div>
</div></div></body></html>