<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
For wms layers to show up in Google Earth, you generate a
groundoverlay. The projection of the mapfile or layers itself is not so
important, as long as the wms service is able to publis in epsg:4326. <br>
<br>
This means that in your map metadata you need to have something like:<br>
<br>
METADATA<br>
&nbsp;&nbsp; "wms_title" "My WMS map"<br>
&nbsp;&nbsp; "wms_srs" "EPSG:4326 EPSG:28992"<br>
&nbsp;&nbsp; "wms_onlineresource"
<a class="moz-txt-link-rfc2396E" href="http://www.myserver.com/cgi-bin/mapserv.exe?map=somemap.map">"http://www.myserver.com/cgi-bin/mapserv.exe?map=somemap.map"</a><br>
&nbsp; END<br>
<br>
where you separate the supported projections with spaces.<br>
<br>
<br>
When you create a GroundOverlay, Google generates the following kml
snippet:<br>
<br>
Make sure to add the STYLES= to the end of the request or mapserver
will generate a wrong result (this is for my 5.0 installation)<br>
<br>
&lt;GroundOverlay&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;name&gt;Terreincontouren&lt;/name&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;color&gt;adffffff&lt;/color&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;Icon&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&lt;href&gt;<a class="moz-txt-link-freetext" href="http://www.myserver.com/cgi-bin/mapserv.exe?map=somemap.map&amp;VERSION=1.1.1&amp;REQUEST=GetMap&amp;SRS=EPSG:4326&amp;WIDTH=1024&amp;HEIGHT=1024&amp;LAYERS=aLayer&amp;TRANSPARENT=TRUE&amp;FORMAT=image/png&amp;STYLES=&amp">http://www.myserver.com/cgi-bin/mapserv.exe?map=somemap.map&amp;amp;VERSION=1.1.1&amp;amp;REQUEST=GetMap&amp;amp;SRS=EPSG:4326&amp;amp;WIDTH=1024&amp;amp;HEIGHT=1024&amp;amp;LAYERS=aLayer&amp;amp;TRANSPARENT=TRUE&amp;amp;FORMAT=image/png&amp;amp;STYLES=&amp;amp</a>;&lt;/href&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;viewRefreshMode&gt;onStop&lt;/viewRefreshMode&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/Icon&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;LatLonBox&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;north&gt;52.43886219516767&lt;/north&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;south&gt;52.19180808173348&lt;/south&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;east&gt;5.137624941169889&lt;/east&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;west&gt;4.652306951338773&lt;/west&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/LatLonBox&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/GroundOverlay&gt;<br>
<br>
<br>
<br>
It is also possible to show a mapserver legend in Google Earth with the
following kml snippet:<br>
<br>
&lt;ScreenOverlay&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;visibility&gt;1&lt;/visibility&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;name&gt;Legenda - Percelen&lt;/name&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;Icon&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&lt;href&gt;<a class="moz-txt-link-freetext" href="http://www.myserver.com/cgi-bin/mapserv.exe?map=somemap.map&amp;VERSION=1.1.1&amp;REQUEST=GetLegendGraphic&amp;LAYER=aLayer&amp;Format=image/png">http://www.myserver.com/cgi-bin/mapserv.exe?map=somemap.map&amp;amp;VERSION=1.1.1&amp;amp;REQUEST=GetLegendGraphic&amp;amp;LAYER=aLayer&amp;amp;Format=image/png</a>&lt;/href&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/Icon&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;overlayXY x="0" y="1" xunits="fraction"
yunits="fraction"/&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;screenXY x="0" y="1" xunits="fraction"
yunits="fraction"/&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;rotationXY x="0.5" y="0.5" xunits="fraction"
yunits="fraction"/&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;size x="-1" y="-1" xunits="pixels" yunits="pixels"/&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/ScreenOverlay&gt;<br>
<br>
<br>
If you embed these snippets in a kml file, you can see what happens.<br>
<br>
<br>
Hans Castorp schreef:
<blockquote cite="mid:005301c838cf$ca49d080$6601a8c0@signo3" type="cite">
  <meta http-equiv="Content-Type" content="text/html; ">
  <meta name="Generator" content="Microsoft Word 11 (filtered medium)">
  <style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
p
        {mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman";}
span.EstiloCorreo17
        {mso-style-type:personal-compose;
        font-family:Arial;
        color:windowtext;}
@page Section1
        {size:595.3pt 841.9pt;
        margin:70.85pt 3.0cm 70.85pt 3.0cm;}
div.Section1
        {page:Section1;}
-->
  </style>
  <div class="Section1">
  <p class="MsoNormal"><font face="Arial" size="2"><span
 style="font-size: 10pt; font-family: Arial;">Hi to all,<o:p></o:p></span></font></p>
  <p class="MsoNormal"><font face="Arial" size="2"><span
 style="font-size: 10pt; font-family: Arial;"><o:p>&nbsp;</o:p></span></font></p>
  <p class="MsoNormal"><font face="Arial" size="2"><span
 style="font-size: 10pt; font-family: Arial;" lang="EN-GB">It&#8217;s
possible to visualize wms layers from
mapserver using Google Earth?? I&#8217;m trying to do it but I&#8217;m always
receiving an error saying that the wms server does not have layer that
google
earth could process. I think this could be something about my map file
configuration. Is there any trick??<o:p></o:p></span></font></p>
  <p class="MsoNormal"><font face="Arial" size="2"><span
 style="font-size: 10pt; font-family: Arial;" lang="EN-GB"><o:p>&nbsp;</o:p></span></font></p>
  <p class="MsoNormal"><font face="Arial" size="2"><span
 style="font-size: 10pt; font-family: Arial;" lang="EN-GB">PD: I&#8217;m
serving GeoTiff and shape layers.<o:p></o:p></span></font></p>
  <p class="MsoNormal"><font face="Arial" size="2"><span
 style="font-size: 10pt; font-family: Arial;" lang="EN-GB"><o:p>&nbsp;</o:p></span></font></p>
  <p class="MsoNormal"><font face="Arial" size="2"><span
 style="font-size: 10pt; font-family: Arial;" lang="EN-GB">Thanks in
advance.<o:p></o:p></span></font></p>
  <p class="MsoNormal"><font face="Arial" size="2"><span
 style="font-size: 10pt; font-family: Arial;" lang="EN-GB">&nbsp;<o:p></o:p></span></font></p>
  <p class="MsoNormal"><font face="Arial" size="2"><span
 style="font-size: 10pt; font-family: Arial;" lang="EN-GB"><o:p>&nbsp;</o:p></span></font></p>
  <div>
  <p class="MsoNormal"><font face="Arial" size="2"><span
 style="font-size: 10pt; font-family: Arial;" lang="EN-GB">Hans Castorp</span></font><span
 lang="EN-GB"><o:p></o:p></span></p>
  </div>
  <p class="MsoNormal"><font face="Times New Roman" size="3"><span
 style="font-size: 12pt;" lang="EN-GB"><o:p>&nbsp;</o:p></span></font></p>
  </div>
  <br>
  <p><font size="2">No virus found in this outgoing message.<br>
Checked by AVG Free Edition.<br>
Version: 7.5.503 / Virus Database: 269.16.17/1176 - Release Date:
06/12/2007 23:15<br>
  </font> </p>
</blockquote>
<br>
<br>
<div class="moz-signature">-- <br>
<title>3DSite</title>
<meta http-equiv="Content-Type" content="text/html; ">
<style type="text/css">
<!--
body {
        background-color: #FFFFFF;
        margin-left: 5px;
        margin-top: 5px;
        margin-right: 5px;
        margin-bottom: 5px;
}
body,td,th {
        font-family: Arial, Helvetica, sans-serif;
        font-size: 12px;
        color: #333333;
}
.style4 {font-size: 9px; }
.style5 {font-size: 9px; color: #CCCCCC; }
-->
</style>
<meta content="MSHTML 6.00.2900.2912" name="GENERATOR">
<br>
<table border="0" cellpadding="0" cellspacing="0" width="400">
  <tbody>
    <tr>
      <td rowspan="3" align="left" height="0" valign="bottom" width="15"><br>
      </td>
      <td colspan="2" align="left" height="78" valign="top" width="0">
      <p class="style4">Milo van der Linden
      <br>
      <a href="skype:milovanderlinden?add">skype: milovanderlinden</a><br>
      <a href="mailto:mlinden@zeelandnet.nl">mlinden@zeelandnet.nl</a><br>
      <a href="mailto:milovanderlinden@gmail.com">milovanderlinden@gmail.com</a><br>
      <a href="mailto:milo@3dsite.nl">milo@3dsite.nl</a><br>
      <a href="http://www.3dsite.nl">http://www.3dsite.nl</a><br>
      </p>
      </td>
      <td rowspan="3" align="left" height="0" valign="top" width="15">&nbsp;</td>
      <td valign="top" width="300">
      <p class="style5"><span lang="NL">De informatie in dit bericht
reflecteert mijn persoonlijke mening en niet die van een bedrijf of
instantie. Aan de informatie kunnen geen rechten worden ontleend.
Indien dit bericht onderdeel is van een forum, mailing-list of
community dan gelden automatisch de bij het betreffende medium
behorende voorwaarden.</span>
      <span lang="EN">The information in this message reflects my
personal opinion and not that of a company or public body. All rights
reserved.If this message is contained in a mailing-list or community,
the rights on the medium are automatically adapted.</span></p>
      </td>
    </tr>
  </tbody>
</table>
</div>
</body>
</html>