Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lidel/discourse-openstreetmap
Discourse plugin to support OSM via URL Oneboxing and iframe whitelisting
https://github.com/lidel/discourse-openstreetmap
discourse openstreetmap
Last synced: 2 days ago
JSON representation
Discourse plugin to support OSM via URL Oneboxing and iframe whitelisting
- Host: GitHub
- URL: https://github.com/lidel/discourse-openstreetmap
- Owner: lidel
- License: cc0-1.0
- Created: 2014-11-10T12:33:46.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2017-10-21T15:19:50.000Z (about 7 years ago)
- Last Synced: 2024-12-03T19:39:15.528Z (20 days ago)
- Topics: discourse, openstreetmap
- Language: Ruby
- Size: 9.77 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
discourse-openstreetmap
=======================> Discourse plugin to support OSM via URL Oneboxing
## Installation on top of Docker image
Add to your `/var/discourse/containers/app.yml`:
```ruby
hooks:
after_code:
- exec:
cd: $home/plugins
cmd:
- mkdir -p plugins
- git clone https://github.com/lidel/discourse-openstreetmap.git
```Rebuild Discourse: `/var/discourse/launcher rebuild app`
## FAQ
### What URLs are oneboxed by this plugin?
https://www.openstreetmap.org/?mlat=[Marker Latitude]&mlon=[Marker Longitude]#map=[Zoom Level]/[Latitude]/[Longitude]&layers=[Layer code]
will be onboxed as a mini-map:
> ![onebox-sample](https://user-images.githubusercontent.com/157609/31852642-79ace722-b67b-11e7-848f-41ba85fd80ef.png)
### Can I just copy&paste `` code from OpenStreetMap.org's share menu?
Sure you can! In past it was done by this plugin, but there is now an `allowed iframes` setting on the Discourse settings page itself at `/admin/site_settings/category/all_results?filter=allowed_iframes`.
Something to keep in mind: embedding of OSM `iframe` is enabled by default only for HTTPS URL. This means if it does not work for you, change ` ![iframe-example](https://user-images.githubusercontent.com/157609/31852829-4c23c4f2-b67f-11e7-8cd3-f0d4c14bf93c.png)
### Is this all there is? I want more OSM integration!
You are in luck! There is a great [Locations Plugin](https://meta.discourse.org/t/locations-plugin/69742?u=lidel), which can be installed in addition to this one.