diff options
author | Chris Schlaeger <chris@linux.com> | 2014-08-12 21:56:44 +0200 |
---|---|---|
committer | Chris Schlaeger <chris@linux.com> | 2014-08-12 21:56:44 +0200 |
commit | ea346a785dc1b3f7c156f6fc33da634e1f1a627b (patch) | |
tree | af67530553d20b6e82ad60fd79593e9c4abf5565 /misc/openlayers/examples/georss.html | |
parent | 59741cd535c47f25971bf8c32b25da25ceadc6d5 (diff) | |
download | postrunner-fb1989bda5d3e0a5472ba7644d57cae197733a8f.zip |
Adding jquery, flot and openlayers to be included with the GEM.v0.0.4
Diffstat (limited to 'misc/openlayers/examples/georss.html')
-rw-r--r-- | misc/openlayers/examples/georss.html | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/misc/openlayers/examples/georss.html b/misc/openlayers/examples/georss.html new file mode 100644 index 0000000..816fcf6 --- /dev/null +++ b/misc/openlayers/examples/georss.html @@ -0,0 +1,63 @@ +<!DOCTYPE html> +<html> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"> + <meta name="apple-mobile-web-app-capable" content="yes"> + <title>OpenLayers GeoRSS Example</title> + <link rel="stylesheet" href="../theme/default/style.css" type="text/css"> + <link rel="stylesheet" href="style.css" type="text/css"> + <script src="../lib/OpenLayers.js"></script> + <script type="text/javascript"> + var map, layer; + + OpenLayers.ProxyHost = "/proxy/?url="; + function init(){ + map = new OpenLayers.Map('map', {maxResolution:'auto'}); + layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", + "http://vmap0.tiles.osgeo.org/wms/vmap0", {layers: 'basic'} ); + map.addLayer(layer); + map.setCenter(new OpenLayers.LonLat(0, 0), 0); + map.addControl(new OpenLayers.Control.LayerSwitcher()); + } + function addUrl() { + var urlObj = OpenLayers.Util.getElement('url'); + var value = urlObj.value; + var parts = value.split("/"); + var newl = new OpenLayers.Layer.GeoRSS( parts[parts.length-1], value); + map.addLayer(newl); + urlObj.value = ""; + } + </script> + </head> + <body onload="init()"> + <h1 id="title">GeoRSS Example</h1> + + <div id="tags"> + georss, style, styling, marker + </div> + + <p id="shortdesc"> + Display a couple of locally cached georss feeds on an a basemap. + </p> + + <div id="map" class="smallmap"></div> + + <div id="docs"> + <p>This demo uses the OpenLayers GeoRSS parser, which supports GeoRSS Simple and W3C GeoRSS. Only points are + currently supported. The OpenLayers GeoRSS parser will automatically connect an information bubble to the map + markers, similar to Google maps. In addition, the parser can use custom PNG icons for markers. A sample GeoRSS + file (georss.xml) is included.</p> + + <form onsubmit="return false;"> + GeoRSS URL: <input type="text" id="url" size="50" value="georss.xml" /> + <input type="submit" onclick="addUrl(); return false;" value="Load Feed" onsubmit="addUrl(); return false;"> + </form> + + <p>The above input box allows the input of a URL to a GeoRSS feed. This feed can be local to the HTML page — + for example, entering 'georss.xml' will work by default, because there is a local file in the directory called + georss.xml — or, with a properly set up ProxyHost variable (as is used here), it will be able to load any + HTTP URL which contains GeoRSS and display it. Anything else will simply have no effect.</p> + </div> + </body> +</html> |