Allow embedding Overpass Turbo results as an iframe

I can embed as map as an iFrame like this (openstreetmap.org - Share - HTML):
<iframe src="https://www.openstreetmap.org/export/embed.html?abcdef"></iframe>


View Larger Map

That’s pretty cool. I would also like to be able to embed the results of an Overpass query (overpass-turbo.eu - Export - as interactive map). Example map

<iframe src="https://overpass-turbo.eu/map.html?Q=abcdef"></iframe>

Embedding this as an iFrame doesn’t work. A bit of Google search tells me there is an allowed iframes setting on the Discourse settings page, where https://overpass-turbo.eu/map.html? could be added an allowed URL.

1 Like

Overpass queries can be arbitrarily expensive for the Overpass server. I guess queries wouldn’t be embedded all that often, since osm.org embeds haven’t either, but I wonder how much load this would result in for the main endpoint after considering Web crawlers and such. Overpass turbo is also capable of hitting an alternative server endpoint via some special syntax embedded in the query, so technically this issue would be relevant to every endpoint.

It would be nice if the Overpass’s embed could optionally defer execution until the user clicks a button or something. As an alternative, Overpass turbo can already export a static image of the results, which you can readily embed inside a post here.

1 Like

Or if it had an option to cache results instead of re-running the query every time the interactive map is opened!

Another option to achieve what I’m trying to do - share a fixed list of objects on an interactive map - could be to allow embedding uMap (not sure which server). It’s a bit more work to create the map, but should be far less load on the server?

1 Like