[OpenLayers-Users] read Format.GeoRSS from http request
Fabio D'Ovidio
fabiodovidio at gmail.com
Fri Jul 11 06:50:32 EDT 2008
Hi!
I know I can read Georss from url like in the examples using Layer.GeoRSS.
Now I am using OpenLayers.Format.GeoRSS because I need to insert GML in
the RSS envelop returned from GeoServer as WFS 1.0.0 request
Now, thi is my code:
vectors = new OpenLayers.Layer.Vector("Vector Layer");
map.addLayers([vectors]);
var options = {
'xy': true
};
var parser = new OpenLayers.Format.GeoRSS(options);
var urlObj = "http://myurl/georssComposer.jsp?"
var features = parser.read(urlObj );
vectors.addFeatures(features);
But I am not able to read my georss.
Is there a way to do that as for Layer.GeoRSS? (it works for my url as
above: http://myurl/georssComposer.jsp?) :
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 = "";
}
Thanks
--
Ing. Fabio D'Ovidio
INOVA Open Solutions s.r.l.
Web : http://www.inovaos.it
Tel.: 081 197 57 600
mail: fabiodovidio at gmail.com
More information about the Users
mailing list