Child pages
  • WMS in Google Earth
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

Table of contents

Add a WMS layer via the Google Earth user interface

Add a WMS layer by editing a kmlmfile

If you save the WMS layer you created via the GUI, you can save that to a separate .kml file. IF you save as a .kmz, that is simply a zipped .kml. You can now edit the .kml in an ASCII edit such as notepad, wordpad or textpad, to see what the syntax is for showing a WMS layer in Google Earth.

Once saved, you will see that kml uses a so-called GroundOverlay element. The GroundOverlay is en element that positions any image on the globe by describing its bounding boxes. The image can be a local image, one that you saved to your local harddisk, or a image on the web. For WMS, the image is actually generated on the fly, using a a very long url. We explain the construction of this url on a separate wms primer.

http://opendap.deltares.nl/thredds/wms/opendap/rijkswaterstaat/vaklodingen/vaklodingenKB121_2120.nc?service=WMS&version=1.3.0&request=GetMap&bbox=4.567220799999999,52.9343465,4.7177535,53.047411499999995&layers=z&format=image/png&crs=EPSG%3A4326&width=800&height=600&styles=boxfill/ferret&COLORSCALERANGE=-500,500&TRANSPARENT=TRUE

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom">
<GroundOverlay>
	<name>vaklodingenKB121_2120 wms</name>
	<description></description>
	<Icon>
        	<href>http://opendap.deltares.nl/thredds/wms/opendap/rijkswaterstaat/vaklodingen/vaklodingenKB121_2120.nc?service=WMS&amp;version=1.3.0&amp;request=GetMap&amp;bbox=4.567220799999999,52.9343465,4.7177535,53.047411499999995&amp;layers=z&amp;format=image/png&amp;crs=EPSG%3A4326&amp;width=800&amp;height=600&amp;styles=boxfill/ferret&amp;COLORSCALERANGE=-500,500&amp;TRANSPARENT=TRUE</href>
	</Icon>
	<LatLonBox>
        	<north>52.9343</north>
        	<south>53.0474</south>
        	<east>4.7178</east>
        	<west>4.5672</west>
	</LatLonBox>
</GroundOverlay>
</kml>
  • No labels