git-svn-id: http://svn.openlayers.org/trunk/openlayers@12082 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
70 lines
2.5 KiB
HTML
70 lines
2.5 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
<title>OpenLayers Google Layer Example</title>
|
|
<link rel="stylesheet" href="../theme/default/style.css" type="text/css">
|
|
<link rel="stylesheet" href="../theme/default/google.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');
|
|
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
|
|
|
var gphy = new OpenLayers.Layer.Google(
|
|
"Google Physical",
|
|
{type: G_PHYSICAL_MAP}
|
|
);
|
|
var gmap = new OpenLayers.Layer.Google(
|
|
"Google Streets", // the default
|
|
{numZoomLevels: 20}
|
|
);
|
|
var ghyb = new OpenLayers.Layer.Google(
|
|
"Google Hybrid",
|
|
{type: G_HYBRID_MAP, numZoomLevels: 20}
|
|
);
|
|
var gsat = new OpenLayers.Layer.Google(
|
|
"Google Satellite",
|
|
{type: G_SATELLITE_MAP, numZoomLevels: 22}
|
|
);
|
|
|
|
|
|
map.addLayers([gphy, gmap, ghyb, gsat]);
|
|
|
|
map.setCenter(new OpenLayers.LonLat(10.2, 48.9), 5);
|
|
}
|
|
</script>
|
|
</head>
|
|
<body onload="init()">
|
|
<h1 id="title">Google Layer Example</h1>
|
|
|
|
<div id="tags">
|
|
Google
|
|
</div>
|
|
|
|
<p id="shortdesc">
|
|
Demonstrate use of the various types of Google layers.
|
|
</p>
|
|
|
|
<div id="map" class="smallmap"></div>
|
|
|
|
<div id="docs">
|
|
<p>
|
|
For best performance, you must be using a version of the Google Maps
|
|
API which is v2.93 or higher. In order to use this version of the API,
|
|
it is best to simply set your application to use the string "v=2" in
|
|
the request, rather than tying your application to an explicit version.</p>
|
|
<p>
|
|
In order to position the Google attribution div in the default location,
|
|
you must include the extra theme/default/google.css stylesheet.</p>
|
|
</div>
|
|
</body>
|
|
</html>
|