# OpenStreet maps embedding

**URL:** https://meta.discourse.org/t/openstreet-maps-embedding/21175
**Category:** Feature
**Created:** [October 15, 2014, 8:34pm UTC](https://meta.discourse.org/t/openstreet-maps-embedding/21175 "2014-10-15T20:34:51Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![kuchaev\_iv](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kuchaev_iv/32/114921_2.png) [@kuchaev\_iv](https://meta.discourse.org/u/kuchaev_iv)
#### Post date: [October 15, 2014, 8:34pm UTC](https://meta.discourse.org/t/openstreet-maps-embedding/21175/1 "2014-10-15T20:34:51Z")

</div>

Continuing the discussion from [Can Google Maps be embedded into Topics?](https://meta.discourse.org/t/can-google-maps-be-embedded-into-topics/11146/5):

> [@zogstrip](#):
>
> Just pushed a fix to whitelist [Google Maps](http://google.com/maps) iframes
> 
> [whitelist google.com/maps iframes · discourse/discourse@9b65388 · GitHub](https://github.com/discourse/discourse/commit/9b6538832d464655dfe5c530137cebe88c9a60d7)
> 
> Here’s an example of an iframe
> 
> \<iframe src=“[https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d101969.57338240159!2d-109.0628192312387!3d36.9966931054637!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x0%3A0x10c8d2d89aa51bbb!2sFour+Corners+Monument!5e0!3m2!1sen!2sus!4v1385680943212](https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d101969.57338240159!2d-109.0628192312387!3d36.9966931054637!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x0%3A0x10c8d2d89aa51bbb!2sFour+Corners+Monument!5e0!3m2!1sen!2sus!4v1385680943212)” width=“400” height=“300” frameborder=“0” style=“border:0”\>\</iframe\>

Can we add this for [http://www.openstreetmap.org/](http://www.openstreetmap.org/)?

---

<div class="post-metadata">

### Author: ![kuchaev\_iv](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kuchaev_iv/32/114921_2.png) [@kuchaev\_iv](https://meta.discourse.org/u/kuchaev_iv)
#### Post date: [October 15, 2014, 8:38pm UTC](https://meta.discourse.org/t/openstreet-maps-embedding/21175/2 "2014-10-15T20:38:28Z")

</div>

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&amp;layer=mapnik&amp;marker=44.61640840520352%2C33.51085424423218" style="border: 1px solid black"></iframe><br/><small><a href="http://www.openstreetmap.org/?mlat=44.6164&amp;mlon=33.5109#map=16/44.6164/33.5109">Посмотреть более крупную карту</a></small>

```

---

<div class="post-metadata">

### Author: ![lidel](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lidel/32/115991_2.png) [@lidel](https://meta.discourse.org/u/lidel)
#### Post date: [October 16, 2014, 7:02am UTC](https://meta.discourse.org/t/openstreet-maps-embedding/21175/3 "2014-10-16T07:02:18Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![kuchaev\_iv](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kuchaev_iv/32/114921_2.png) [@kuchaev\_iv](https://meta.discourse.org/u/kuchaev_iv)
#### Post date: [October 16, 2014, 7:23am UTC](https://meta.discourse.org/t/openstreet-maps-embedding/21175/4 "2014-10-16T07:23:06Z")

</div>

Let’s include Wikimapia also 😊

---

<div class="post-metadata">

### Author: ![lidel](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lidel/32/115991_2.png) [@lidel](https://meta.discourse.org/u/lidel)
#### Post date: [November 17, 2014, 1:54pm UTC](https://meta.discourse.org/t/openstreet-maps-embedding/21175/5 "2014-11-17T13:54:48Z")

</div>

Hi, short update:

I created PR which adds OSM iframe whitelisting:

[https://github.com/discourse/discourse/pull/2973](https://github.com/discourse/discourse/pull/2973)

If someone is interested I also started development of a simple onebox plugin: [discourse-openstreetmap](https://github.com/lidel/discourse-openstreetmap).

It provides oneboxer for links like:

> **[OpenStreetMap](https://www.openstreetmap.org/?mlat=51.2269&mlon=22.5115)**
>
> OpenStreetMap is a map of the world, created by people like you and free to use under an open license.

With the [recent change to onebox](https://github.com/discourse/onebox/pull/252) library, oneboxing of links starting with a hash (like [OpenStreetMap](http://www.openstreetmap.org/#map=12/48.8557/2.3186)) 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](https://github.com/discourse/onebox/) library.)

---

<div class="post-metadata">

### Author: ![hellekin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hellekin/32/51636_2.png) [@hellekin](https://meta.discourse.org/u/hellekin)
#### Post date: [November 21, 2017, 11:40am UTC](https://meta.discourse.org/t/openstreet-maps-embedding/21175/6 "2017-11-21T11:40:29Z")

</div>

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](https://meta.discourse.org/t/locations-plugin/69742) plugin…

[http://umap.fluv.io/en/map/belvil-pick-up\_5141](http://umap.fluv.io/en/map/belvil-pick-up_5141)

[http://umap.openstreetmap.fr/en/map/ethnographic-map-of-mus-and-bingol-updated11\_180964](http://umap.openstreetmap.fr/en/map/ethnographic-map-of-mus-and-bingol-updated11_180964)

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [January 23, 2018, 5:16am UTC](https://meta.discourse.org/t/openstreet-maps-embedding/21175/7 "2018-01-23T05:16:20Z")

</div>

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:

- whitelist openstreetmap in settings → security
- if necessary, ensure the iframe includes the https flavour of links (you may have to manually add the ‘s’ to ‘http’ - check both links, the one inside the iframe tag may be just ‘http’).

Then the map should appear as expected:

https://www.openstreetmap.org/export/embed.html?bbox=-77.0174539089203%2C38.886924164502304%2C-77.0101583003998%2C38.892636142310295&layer=mapnik&marker=38.88977836463753%2C-77.01380575000002  
[View Larger Map](https://www.openstreetmap.org/?mlat=38.88978&mlon=-77.01381#map=17/38.88978/-77.01381)

---

<div class="post-metadata">

### Author: ![chapoi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chapoi/32/537252_2.png) [@chapoi](https://meta.discourse.org/u/chapoi)
#### Post date: [December 4, 2025, 11:32am UTC](https://meta.discourse.org/t/openstreet-maps-embedding/21175/8 "2025-12-04T11:32:28Z")

</div>


