git-svn-id: http://svn.openlayers.org/trunk/openlayers@7095 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
58 lines
2.0 KiB
HTML
58 lines
2.0 KiB
HTML
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<title>OpenLayers Google with Overlay Example</title>
|
|
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
|
|
<link rel="stylesheet" href="style.css" type="text/css" />
|
|
<!-- 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>
|
|
<script src="../lib/OpenLayers.js"></script>
|
|
<script type="text/javascript">
|
|
var map;
|
|
|
|
function init(){
|
|
map = new OpenLayers.Map('map');
|
|
|
|
var satellite = new OpenLayers.Layer.Google(
|
|
"Google Satellite" , {type: G_SATELLITE_MAP}
|
|
);
|
|
|
|
var wms = 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'
|
|
},
|
|
{'reproject': true}
|
|
);
|
|
|
|
map.addLayers([satellite, wms]);
|
|
|
|
map.setCenter(new OpenLayers.LonLat(10.205188,48.857593), 5);
|
|
map.addControl( new OpenLayers.Control.LayerSwitcher() );
|
|
}
|
|
</script>
|
|
</head>
|
|
<body onload="init()">
|
|
<h1 id="title">Google with Overlay Example</h1>
|
|
|
|
<div id="tags"></div>
|
|
|
|
<p id="shortdesc">
|
|
Demonstrate a Google basemap used with boundary overlay layer.
|
|
</p>
|
|
|
|
<div id="map" class="smallmap"></div>
|
|
|
|
<div id="docs">
|
|
An overlay in a Geographic projection can be stretched to somewhat
|
|
line up with Google tiles (in a Mercator projection). Results get
|
|
worse farther from the equator. Use the "reproject" option on a
|
|
layer to get this behavior. Use the sphericalMercator option on
|
|
a Google layer to get proper overlays (with other layers in
|
|
Spherical Mercator).
|
|
</div>
|
|
</body>
|
|
</html>
|