<?xml version="1.0" encoding="UTF-8"?>
<Module>
<ModulePrefs title="EarthTools.org Elevation Contours"
                description="Elevation Contour overlay provided by EarthTools.org"
                author="Jonathan Stott"
                author_email="jonathan@jstott.me.uk"
                screenshot="http://www.earthtools.org/mappletss.png"
                thumbnail="http://www.earthtools.org/mapplettn.png">
  <Require feature="sharedmap"/>
  <Require feature="analytics"/>
</ModulePrefs>
<Content type="html"><![CDATA[

<div style="background-color: #FF9D4D; height: 73px; margin: 0px; padding: 0px; text-align: center;">
  <img src="http://www.earthtools.org/earthtools2.png" width="253" height="73" alt="EarthTools" />
</div>
        
<p>
  Contour interval: <span id="earthtools_ci" style="font-weight: bold;"></span><br />
</p>

<p>
  Visit <a href="http://www.earthtools.org/">EarthTools.org</a> for more map tools.
</p>

<p>
  Contour maps &copy; 2006-7 EarthTools.org
</p>

<script>
  _IG_Analytics("UA-2659607-2", "/contour-mapplet");
  var map = new GMap2();
  var contourOverlay = new GTileLayerOverlay(new GTileLayer(null, null, null, { tileUrlTemplate: 'http://www.earthtools.org/tiles.php?x={X}&y={Y}&z={Z}' }));              
  map.addOverlay(contourOverlay);
  GEvent.addListener(map, "zoomend", function() {
    map.getZoomAsync(function(zoom) {
      if (zoom < 9) { document.getElementById('earthtools_ci').innerHTML = "Zoom in for contours"; }
      else if (zoom == 9) { document.getElementById('earthtools_ci').innerHTML = "200m"; }
      else if (zoom == 10) { document.getElementById('earthtools_ci').innerHTML = "100m"; }
      else if (zoom == 11) { document.getElementById('earthtools_ci').innerHTML = "100m"; }
      else if (zoom == 12) { document.getElementById('earthtools_ci').innerHTML = "50m"; }
      else if (zoom == 13) { document.getElementById('earthtools_ci').innerHTML = "25m"; }
      else if (zoom == 14) { document.getElementById('earthtools_ci').innerHTML = "10m"; }
      else if (zoom == 15) { document.getElementById('earthtools_ci').innerHTML = "10m"; }
      else { document.getElementById('earthtools_ci').innerHTML = "Zoom out for contours"; }
    });
  });
</script>

]]></Content>
</Module>