summaryrefslogtreecommitdiff
path: root/misc/openlayers/examples/google.html
diff options
context:
space:
mode:
Diffstat (limited to 'misc/openlayers/examples/google.html')
-rw-r--r--misc/openlayers/examples/google.html69
1 files changed, 69 insertions, 0 deletions
diff --git a/misc/openlayers/examples/google.html b/misc/openlayers/examples/google.html
new file mode 100644
index 0000000..e6e20b2
--- /dev/null
+++ b/misc/openlayers/examples/google.html
@@ -0,0 +1,69 @@
+<!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&amp;v=2&amp;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>