[GIS] How to display OSM relations in Openlayers with tags as legend

openlayers-2openstreetmap

I would like to show this type of relations in a simple map with Openlayers.
http://www.openstreetmap.org/api/0.6/relation/1637735/full

I'm specially interested in being able to show tags as legend. Do you know how can I do it in the simplest way possible?

I'm not sure if Openlayers has already a package to display relations.

Best Answer

There are two solutions that I use for REST applications, most of the time I use both:
1)Store the tags in a array and use JavaScrip to keep track of tags related to a feature.
2)Populate the feature with some or all the tags with an iteration.

For example, load the geometries into a layer with one request, load the tags with other request, relate them with the ID. Now to have some resources working like the bubble popup, pupulate the layer with some important or desired attributes.