[OpenLayers-Users] read Format.GeoRSS from http request

Christopher Schmidt crschmidt at metacarta.com
Fri Jul 11 09:54:55 EDT 2008


On Fri, Jul 11, 2008 at 03:24:37PM +0200, Fabio D'Ovidio wrote:
> Hi and Thanks for the replay.
> I tryed but it didn't work.....
> 
> the code is:
> var urlObj = "myurl"
>                
>                
>                  var features = new OpenLayers.Layer.GML("GeoRSS", 
> urlObj, {format: OpenLayers.Format.GeoRSS});

This is not what I said. 

What is your goal? I thought that you were trying to add a layer. Adding
a layer is done exactly as I said: var l = new OL.Layer.GML();
map.addLayer(l); 

What you're doing here appears to be unrelated to that, with some other
goal that I don't understand.

The layer is 'l', the features are l.features, the parser can write out
the features via var p = new OpenLayers.Format.GeoRSS();
p.write(l.features)... but why would you want to? You don't need to
write out the GeoRSS file...

-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list