]> dev.renevier.net Git - syp.git/blob - openlayers/examples/google.html
add some margin around image
[syp.git] / openlayers / examples / google.html
1 <html xmlns="http://www.w3.org/1999/xhtml">
2   <head>
3     <title>OpenLayers Google Layer Example</title>
4     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
5     <link rel="stylesheet" href="../theme/default/google.css" type="text/css" />
6     <link rel="stylesheet" href="style.css" type="text/css" />
7     <!-- this gmaps key generated for http://openlayers.org/dev/ -->
8     <script src='http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAjpkAC9ePGem0lIq5XcMiuhR_wWLPFku8Ix9i2SXYRVK3e45q1BQUd_beF8dtzKET_EteAjPdGDwqpQ'></script>
9     <script src="../lib/OpenLayers.js"></script>
10     <script type="text/javascript">
11         var map;
12
13         function init() {
14             map = new OpenLayers.Map('map');
15             map.addControl(new OpenLayers.Control.LayerSwitcher());
16             
17             var gphy = new OpenLayers.Layer.Google(
18                 "Google Physical",
19                 {type: G_PHYSICAL_MAP}
20             );
21             var gmap = new OpenLayers.Layer.Google(
22                 "Google Streets", // the default
23                 {numZoomLevels: 20}
24             );
25             var ghyb = new OpenLayers.Layer.Google(
26                 "Google Hybrid",
27                 {type: G_HYBRID_MAP, numZoomLevels: 20}
28             );
29             var gsat = new OpenLayers.Layer.Google(
30                 "Google Satellite",
31                 {type: G_SATELLITE_MAP, numZoomLevels: 20}
32             );
33
34
35             map.addLayers([gphy, gmap, ghyb, gsat]);
36
37             map.setCenter(new OpenLayers.LonLat(10.2, 48.9), 5);
38         }
39     </script>
40   </head>
41   <body onload="init()">
42     <h1 id="title">Google Layer Example</h1>
43
44     <div id="tags"></div>
45
46     <p id="shortdesc">
47         Demonstrate use of the various types of Google layers.
48     </p>
49
50     <div id="map" class="smallmap"></div>
51
52     <div id="docs">
53      <p>
54         For best performance, you must be using a version of the Google Maps
55         API which is v2.93 or higher. In order to use this version of the API,
56         it is best to simply set your application to use the string "v=2" in
57         the request, rather than tying your application to an explicit version.</p>
58      <p>
59        In order to position the Google attribution div in the default ocation,
60        you must include the extra theme/default/google.css stylesheet.</p>
61     </div>
62   </body>
63 </html>