git-svn-id: http://svn.openlayers.org/trunk/openlayers@4222 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
49 lines
2.0 KiB
HTML
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&v=2&key=ABQIAAAAjpkAC9ePGem0lIq5XcMiuhR_wWLPFku8Ix9i2SXYRVK3e45q1BQUd_beF8dtzKET_EteAjPdGDwqpQ'></script>-->
|
|
<!-- dev.openlayers.org key -->
|
|
<script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAeDjUod8ItM9dBg5_lz0esxTk5UTxNMOJaMwpeYJby65YwI0-cxSmHf2_ZfIP7bDb_moMph5qZy25YA" type="text/javascript"></script>
|
|
<!-- Localhost key -->
|
|
<!-- <script src='http://maps.google.com/maps?file=api&v=2&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/cgi-bin/mapserv?",
|
|
{map: '/www/freemap.in/world/map/factbooktrans.map', transparent:'true',
|
|
layers: 'factbook', 'format':'png'}, {'reproject': false} );
|
|
map.addLayers([gmap, 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>
|