Embedding an OSM Map and Showing a Relation

I want to embed a map showing a public transport route, like this:

When I copy the HTML embed/iframe code, and publish it to a page, the map is displayed, but not the transport route – the relation. Like this.

Is it possible to change the URL parameters in the iframe so that the route will show? If so, what do I do?

This is something I want to to programmatically (not one off). I want to automatically generate pages that look like this so people can share their public transport routes. (In the example, there is a screenshot instead of an iframe, because the embed does not show the route.)

4 posts - 2 participants

Read full topic


Ce sujet de discussion accompagne la publication sur https://community.openstreetmap.org/t/embedding-an-osm-map-and-showing-a-relation/6085