Continuing the discussion from Can Google Maps be embedded into Topics?:
Can we add this for http://www.openstreetmap.org/?
The discussion revolves around enabling OpenStreetMap (OSM) embedding in Discourse, inspired by a prior fix for Google Maps iframes zogstrip. kuchaev_iv shares an iframe example for OSM, while lidel suggests supporting permalinks for oneboxing, noting OSM should be the open, free alternative to Google Maps. kuchaev_iv proposes including Wikipedia links too. lidel later announces a PR for OSM iframe whitelisting and begins work on a onebox plugin, compatible with Discourse’s updated onebox library. hellekin suggests embedding UMAP links directly, referencing potential integration with the OpenStreetMap or Locat plugin. merefield clarifies that embedding requires whitelisting OSM in Discourse settings and ensuring HTTPS links in iframes — with correct formatting, the map renders as expected. The thread reflects community-driven efforts to expand map integration, prioritizing open-source alternatives and user-friendly embeds.
Continuing the discussion from Can Google Maps be embedded into Topics?:
Can we add this for http://www.openstreetmap.org/?
Here is the iframe:
<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://www.openstreetmap.org/export/embed.html?bbox=33.49883794784546%2C44.61190236910504%2C33.52287054061889%2C44.62091409166478&layer=mapnik&marker=44.61640840520352%2C33.51085424423218" style="border: 1px solid black"></iframe><br/><small><a href="http://www.openstreetmap.org/?mlat=44.6164&mlon=33.5109#map=16/44.6164/33.5109">Посмотреть более крупную карту</a></small>
There are also permalinks which could trigger oneboxing:
http://www.openstreetmap.org/?mlat=51.2269&mlon=22.5115#map=16/51.2269/22.5115
This would be a good way to emphasize Discourse’s support of open web. ![]()
OSM is the only real and open alternative to Google Maps we have.
IMO should be supported and whitelisted by default: just like Wikipedia is.
Let’s include Wikimapia also ![]()
Hi, short update:
I created PR which adds OSM iframe whitelisting:
https://github.com/discourse/discourse/pull/2973
If someone is interested I also started development of a simple onebox plugin: discourse-openstreetmap.
It provides oneboxer for links like:
With the recent change to onebox library, oneboxing of links starting with a hash (like OpenStreetMap) works too.
(Perhaps if the PR above gets accepted and the plugin feels mature enough at some point the OSM oneboxer could be introduced as a PR for the onebox library.)
Wouldn’t it be nice to have direct embedding of OSM maps from UMAP links? For example, this doesn’t give anything now, but it could embed the actual map, maybe using the OpenStreetMap plugin, or the Locations plugin…
http://umap.fluv.io/en/map/belvil-pick-up_5141
http://umap.openstreetmap.fr/en/map/ethnographic-map-of-mus-and-bingol-updated11_180964
You may know this by now, and it may not have been possible back then, but there are two things you need to check to see the actual map in place, rather than just a friendly external link:
Then the map should appear as expected: