OpenLayers OpenLayers

root/branches/openlayers/2.5/examples/gml-layer.html

Revision 4222, 0.9 kB (checked in by tschaub, 1 year ago)

exposing the map for firebuggers - and removing some crufty html comments

  • Property svn:eol-style set to native
Line 
1 <html xmlns="http://www.w3.org/1999/xhtml">
2   <head>
3     <style type="text/css">
4         #map {
5             width: 800px;
6             height: 475px;
7             border: 1px solid black;
8         }
9     </style>
10     <script src="../lib/OpenLayers.js"></script>
11     <script type="text/javascript">
12         var lon = 5;
13         var lat = 40;
14         var zoom = 5;
15         var map, layer;
16
17         function init(){
18             map = new OpenLayers.Map('map');
19             layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
20                     "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
21             map.addLayer(layer);
22             map.zoomToExtent(new OpenLayers.Bounds(-3.922119,44.335327,4.866943,49.553833));
23             map.addLayer(new OpenLayers.Layer.GML("GML", "gml/polygon.xml"));
24         }
25     </script>
26   </head>
27   <body onload="init()">
28     <div id="map"></div>
29   </body>
30 </html>
Note: See TracBrowser for help on using the browser.