From 102820ad7717b98e7e8676da6e57edcc5fa54c67 Mon Sep 17 00:00:00 2001 From: crschmidt Date: Tue, 27 Jun 2006 20:23:37 +0000 Subject: [PATCH] Commit a GeoRSS example which allows you to enter the URL yourself, and display multiple GeoRSS results. git-svn-id: http://svn.openlayers.org/trunk/openlayers@803 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- examples/georss.html | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/examples/georss.html b/examples/georss.html index b5d9da249d..fc1d083357 100644 --- a/examples/georss.html +++ b/examples/georss.html @@ -4,7 +4,7 @@ @@ -14,24 +14,29 @@ var map, layer; function init(){ - OpenLayers.ProxyHost = '/proxy/?url='; map = new OpenLayers.Map('map', {maxResolution:'auto'}); layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} ); - map.addLayer(layer); - - var newl = new OpenLayers.Layer.GeoRSS( "text", "http://earthquake.usgs.gov/eqcenter/recenteqsww/catalogs/eqs7day-M2.5.xml" ); - map.addLayer(newl); - map.setCenter(new OpenLayers.LonLat(0, 0), 0); map.addControl(new OpenLayers.Control.LayerSwitcher()); } + function addUrl() { + var value = $('url').value; + var parts = value.split("/"); + var newl = new OpenLayers.Layer.GeoRSS( parts[parts.length-1], value); + map.addLayer(newl); + $("url").value = ""; + } // --> -

OpenLayers Example

+

GeoRSS in OpenLayers

+

This demo uses the OpenLayers GeoRSS parser, which supports GeoRSS Simple and W3C GeoRSS. Only points are currently supported. Get the code!

+
+ GeoRSS URL: +