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: +