1 <html xmlns="http://www.w3.org/1999/xhtml">
3 <title>OpenLayers GeoRSS Example</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">
10 OpenLayers.ProxyHost = "/proxy/?url=";
12 map = new OpenLayers.Map('map', {maxResolution:'auto'});
13 layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
14 "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
16 map.setCenter(new OpenLayers.LonLat(0, 0), 0);
17 map.addControl(new OpenLayers.Control.LayerSwitcher());
20 var urlObj = OpenLayers.Util.getElement('url');
21 var value = urlObj.value;
22 var parts = value.split("/");
23 var newl = new OpenLayers.Layer.GeoRSS( parts[parts.length-1], value);
29 <body onload="init()">
30 <h1 id="title">GeoRSS Example</h1>
35 Display a couple of locally cached georss feeds on an a basemap.
38 <div id="map" class="smallmap"></div>
41 <p>This demo uses the OpenLayers GeoRSS parser, which supports GeoRSS Simple and W3C GeoRSS. Only points are
42 currently supported. The OpenLayers GeoRSS parser will automatically connect an information bubble to the map
43 markers, similar to Google maps. In addition, the parser can use custom PNG icons for markers. A sample GeoRSS
44 file (georss.xml) is included.
46 <form onsubmit="return false;">
47 GeoRSS URL: <input type="text" id="url" size="50" value="georss.xml" />
48 <input type="submit" onclick="addUrl(); return false;" value="Load Feed" onsubmit="addUrl(); return false;" />
51 <p>The above input box allows the input of a URL to a GeoRSS feed. This feed can be local to the HTML page --
52 for example, entering 'georss.xml' will work by default, because there is a local file in the directory called
53 georss.xml -- or, with a properly set up ProxyHost variable (as is used here), it will be able to load any
54 HTTP URL which contains GeoRSS and display it. Anything else will simply have no effect.</p>