Files
openlayers/examples/google-factbook-tc.html
2007-09-11 21:50:35 +00:00

49 lines
2.0 KiB
HTML

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
#map {
width: 100%;
height: 512px;
border: 1px solid gray;
}
</style>
<!-- this gmaps key generated for http://openlayers.org/dev/ -->
<!--<script src='http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAjpkAC9ePGem0lIq5XcMiuhR_wWLPFku8Ix9i2SXYRVK3e45q1BQUd_beF8dtzKET_EteAjPdGDwqpQ'></script>-->
<!-- dev.openlayers.org key -->
<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAeDjUod8ItM9dBg5_lz0esxTk5UTxNMOJaMwpeYJby65YwI0-cxSmHf2_ZfIP7bDb_moMph5qZy25YA" type="text/javascript"></script>
<!-- Localhost key -->
<!-- <script src='http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAjpkAC9ePGem0lIq5XcMiuhT2yXp_ZAY8_ufC3CFXhHIE1NvwkxTS6gjckBmeABOGXIUiOiZObZESPg'></script>-->
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
var map, gmap, merc;
function init(){
var options = {
projection: "EPSG: 54004",
units: "m",
maxResolution: 156543.0339,
maxExtent: new OpenLayers.Bounds(-20037508, -20037508,
20037508, 20037508.34)
};
map = new OpenLayers.Map('map', options);
gmap = new OpenLayers.Layer.GoogleMercator("Google", {'minZoomLevel': 4});
var twms = new OpenLayers.Layer.WMS( "World Map",
"http://world.freemap.in/tiles?",
{layers: 'factbook-overlay', 'format':'png'}, {'reproject': false, isBaseLayer: false} );
map.addLayers([gmap, twms]);
map.addLayer(twms);
map.addControl(new OpenLayers.Control.LayerSwitcher());
map.zoomToMaxExtent()
}
</script>
</head>
<body onload="init()">
<h1>OpenLayers With Google Layer Example</h1>
<div id="map"></div>
</body>
</html>