]> dev.renevier.net Git - syp.git/blob - openlayers/examples/mouse-position.html
add some margin around image
[syp.git] / openlayers / examples / mouse-position.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
3 <html xmlns="http://www.w3.org/1999/xhtml" debug="true">
4   <head>
5     <title>MousePosition Control</title>
6     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
7     <link rel="stylesheet" href="style.css" type="text/css" />
8     <script src="../lib/OpenLayers.js"></script>
9     <script type="text/javascript">
10         var map;
11         function init(){
12             var map = new OpenLayers.Map('map');
13
14             map.addControl(new OpenLayers.Control.MousePosition());
15
16             var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS", 
17                 "http://labs.metacarta.com/wms/vmap0",
18                 {layers: 'basic'} );
19
20             map.addLayers([ol_wms]);
21             if (!map.getCenter()) map.zoomToMaxExtent();
22
23         }
24     </script>
25   </head>
26   <body onload="init()">
27     <div id="map" class="smallmap"></div>
28   </body>
29 </html>