]> dev.renevier.net Git - syp.git/blob - openlayers/examples/editingtoolbar.html
reset openlayers directory to its original state at the end of build.sh
[syp.git] / openlayers / examples / editingtoolbar.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml">
3     <head>
4         <title>OpenLayers Editing Toolbar Example</title>
5         
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 src="../lib/Firebug/debug.js"></script>
10         <script type="text/javascript">
11             var lon = 5;
12             var lat = 40;
13             var zoom = 5;
14             var map, layer;
15
16             function init(){
17                 layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
18                         "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
19     
20                 vlayer = new OpenLayers.Layer.Vector( "Editable" );
21                 map = new OpenLayers.Map( 'map', {
22                     controls: [
23                         new OpenLayers.Control.PanZoom(),
24                         new OpenLayers.Control.EditingToolbar(vlayer)
25                     ]
26                 });
27                 map.addLayers([layer, vlayer]);
28     
29                 map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);
30             }
31         </script>
32     </head>
33     <body onload="init()">
34         <h1 id="title">Editing Toolbar Example</h1>
35
36         <div id="tags"></div>
37
38         <p id="shortdesc">
39             Demonstrate polygon, polyline and point creation and editing tools.
40         </p>
41
42         <div id="panel"></div>
43         <div id="map" class="smallmap"></div>
44
45         <div id="docs"></div>
46     </body>
47 </html>