# Technical: Embedding Maps into Discourse Forum

**URL:** <https://forum.bettertransportqueensland.org/t/technical-embedding-maps-into-discourse-forum/516>\
**Category:** Technical\
**Created:** [29 May 2025 21:39 UTC](https://forum.bettertransportqueensland.org/t/technical-embedding-maps-into-discourse-forum/516 "2025-05-29T21:39:13Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Metro](https://forum.bettertransportqueensland.org/user_avatar/forum.bettertransportqueensland.org/metro/32/237_2.png) [@Metro](https://forum.bettertransportqueensland.org/u/Metro)\
**Post date:** [29 May 2025 21:39 UTC](https://forum.bettertransportqueensland.org/t/technical-embedding-maps-into-discourse-forum/516/1 "2025-05-29T21:39:13Z")

</div>

I have been doing some basic background research into how we might embed Google Maps (or other things) into discourse. The purpose of this would be to ultimately embed an Ideal Network Map (INP) safely.

ChatGPT suggests the following:

> Discourse has a handful of plugins and built-in “onebox” handlers that leverage **oEmbed** to safely embed content from supported providers (e.g. YouTube, Twitter—and with the right plugin, Google Maps). The most popular community option is the **discourse-oembed** plugin (sometimes called “onebox-oembed”) which:
> 
> 1. **Adds oEmbed support for extra sites**  
> – Beyond the built-in list, you can whitelist additional oEmbed providers (e.g. Google Maps, Mapbox, SoundCloud, Vimeo, etc.).
> 2. **Handles link-only embeds**  
> – You simply paste a share URL on its own line; the plugin fetches the oEmbed JSON endpoint, sanitizes the returned HTML (stripping scripts/CSS), and renders a safe `<iframe>` or `<blockquote>`.
> 3. **Respects Discourse’s security**  
> – All embed HTML is passed through the same sanitizer, so you never open up your site to arbitrary iframes—only those the admin has explicitly enabled.
> 4. **Is easy to configure**
> 
> - Install via your host (if using a hosted service) or clone the repo into `plugins/` on self-hosted forums.
> - In **Admin → Settings → oEmbed** , add the provider’s oEmbed endpoint (e.g. `https://www.google.com/maps/oembed?url=%{url}`).
> - Optionally set max width/height, timeout, and caching rules.
> 
> 1. **Supports caching**  
> – oEmbed responses are cached in your Discourse database to avoid repeated external calls.

There were also some other links given:

> **[oEmbed](https://oembed.com/)**
>
> The oEmbed spec

> **[GitHub - iamcal/oembed: The oEmbed Spec](https://github.com/iamcal/oembed)**
>
> The oEmbed Spec

Any thoughts on this or an alternative for embedding maps into the forum? Is Google Maps preferred or is there perhaps something that might better meet our needs?

---

<div class="post-metadata">

**Author:** ![rowangray](https://forum.bettertransportqueensland.org/user_avatar/forum.bettertransportqueensland.org/rowangray/32/5835_2.png) [@rowangray](https://forum.bettertransportqueensland.org/u/rowangray)\
**Post date:** [29 May 2025 21:41 UTC](https://forum.bettertransportqueensland.org/t/technical-embedding-maps-into-discourse-forum/516/2 "2025-05-29T21:41:28Z")

</div>

If we are able to get the Well Known Text representation, it’s conceivable that we could host it ourselves.

---

<div class="post-metadata">

**Author:** ![Metro](https://forum.bettertransportqueensland.org/user_avatar/forum.bettertransportqueensland.org/metro/32/237_2.png) [@Metro](https://forum.bettertransportqueensland.org/u/Metro)\
**Post date:** [29 May 2025 22:44 UTC](https://forum.bettertransportqueensland.org/t/technical-embedding-maps-into-discourse-forum/516/3 "2025-05-29T22:44:01Z")

</div>

Could you perhaps provide more detail about it?

---

<div class="post-metadata">

**Author:** ![rowangray](https://forum.bettertransportqueensland.org/user_avatar/forum.bettertransportqueensland.org/rowangray/32/5835_2.png) [@rowangray](https://forum.bettertransportqueensland.org/u/rowangray)\
**Post date:** [29 May 2025 22:57 UTC](https://forum.bettertransportqueensland.org/t/technical-embedding-maps-into-discourse-forum/516/4 "2025-05-29T22:57:43Z")

</div>

There are open source mapping solutions that we can host on our domain. E.g. [inp.btq.org.au](http://inp.btq.org.au).

These solutions simply require us to provide the data in a format it can understand. Well Known Text (WKT) is a map geometry standard. I’m not sure whether google maps supports WKT export.

---

<div class="post-metadata">

**Author:** ![rowangray](https://forum.bettertransportqueensland.org/user_avatar/forum.bettertransportqueensland.org/rowangray/32/5835_2.png) [@rowangray](https://forum.bettertransportqueensland.org/u/rowangray)\
**Post date:** [29 May 2025 23:13 UTC](https://forum.bettertransportqueensland.org/t/technical-embedding-maps-into-discourse-forum/516/5 "2025-05-29T23:13:14Z")

</div>

> **[react-map-gl](https://visgl.github.io/react-map-gl/examples)**

Here’s an example of some of the things that can be done.

---

<div class="post-metadata">

**Author:** ![alexjago](https://forum.bettertransportqueensland.org/user_avatar/forum.bettertransportqueensland.org/alexjago/32/49_2.png) [@alexjago](https://forum.bettertransportqueensland.org/u/alexjago)\
**Post date:** [30 May 2025 03:43 UTC](https://forum.bettertransportqueensland.org/t/technical-embedding-maps-into-discourse-forum/516/6 "2025-05-30T03:43:53Z")

</div>

If we can download anything from GMaps then there’s probably a converter.
