]> dev.renevier.net Git - syp.git/blob - openlayers/examples/markersTextLayer.html
initial commit
[syp.git] / openlayers / examples / markersTextLayer.html
1 <html xmlns="http://www.w3.org/1999/xhtml">
2   <head>
3     <title>Using a Layer.Text to display markers</title>
4     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
5     <link rel="stylesheet" href="style.css" type="text/css" />
6     <script src="../lib/OpenLayers.js"></script>
7     <script type="text/javascript">
8         var map, layer;
9
10         function init(){
11             OpenLayers.ProxyHost="/proxy/?url=";
12             map = new OpenLayers.Map('map');
13             layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", 
14                 "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
15                 
16             map.addLayer(layer);
17
18             var newl = new OpenLayers.Layer.Text( "text", {location: "./textfile.txt"} );
19             map.addLayer(newl);
20
21             map.addControl(new OpenLayers.Control.LayerSwitcher());
22             map.zoomToMaxExtent();
23         }
24     </script>
25   </head>
26   <body onload="init()">
27     <h1 id="title">Using a Layer.Text to display markers</h1>
28     <p id="shortdesc">
29       The Layer.Text class reads a Tab seperated values file and displays it as markers on
30       the map.
31     </p>  
32     <div id="map" class="smallmap"></div>
33   </body>
34 </html>