OpenLayers OpenLayers

Ticket #450: simple-test.html

File simple-test.html, 1.4 kB (added by sderle, 2 years ago)

same as Tim's mouse position example, but with the regular controls left in so you can zoom/in out

Line 
1 <html xmlns="http://www.w3.org/1999/xhtml">
2   <head>
3     <title>Marker Test Case for #450</title>
4     <meta http-equiv="imagetoolbar" content="no"> <!--ie image gizmo OFF!-->
5     <style type="text/css">
6         #map {
7             width: 500px;
8             height: 350px;
9             border: 1px solid black;
10         }
11     </style>
12     <script src='http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAbv-Hu2gd0IW8TSiQEVd6YRTXfS9d5ZKtEOxk7co_6m1dV8k1dBS4pWQn_jRemi6KWsX73-wGXGSZNw'> </script>
13     <script src="../lib/OpenLayers.js"></script>
14
15     <script type="text/javascript">
16 <!--
17 var map, wmsLayer, googleLayer;
18
19 function init(){
20     map = new OpenLayers.Map('map');
21
22     googleLayer = new OpenLayers.Layer.Google( "Google Hybrid2" , {type: G_HYBRID_MAP });
23     wmsLayer = new OpenLayers.Layer.WMS( "OpenLayers WMS2",
24         "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
25                
26     map.addLayers([wmsLayer, googleLayer]);
27
28     map.addControl(new OpenLayers.Control.MousePosition());
29
30     map.zoomToMaxExtent();
31
32     map.setBaseLayer(googleLayer, true);
33     map.zoomIn();
34     map.pan(0, -200);
35     //alert("hi");
36     map.setBaseLayer(wmsLayer);
37     //map.zoomIn();
38     //map.zoomOut();
39     // it works right at this point
40 }
41         // -->
42     </script>
43   </head>
44   <body onload="init()">
45     <div id="map"></div>
46   </body>
47 </html>