I'm using this code to add xml (osm relations) files to my map.
osm_layer = new OpenLayers.Layer.GML("Polygon", relation.xml, {
format: OpenLayers.Format.OSM,
style: {strokeColor: "blue"},
projection: new OpenLayers.Projection("EPSG:4326")
});
But what I need is to add more than one relation.xml per layer, as relation1.xml, relation2.xml in the SAME layer. Until know I can only show multiple xml if they go in multiple layers.
When using vectors I just created the layer and then added the vectors by something like
polygonFeature = new OpenLayers.Feature.Vector(
new OpenLayers.Geometry.Polygon(linearRing), style);
And then
Layer.addFeatures(polygonFeature);
However, I can't make it work with xml / OSM relation format...
Thanks!