aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhellekin <how@cepheide.org>2024-03-17 13:01:50 +0100
committerhellekin <how@cepheide.org>2024-03-17 13:01:50 +0100
commit011f56dfc8e426d1db77fee830ea4900e5f50cda (patch)
treef736f45a2283a6d2c2f587fa616147416bc473b4
parentf6f88b65f153457214a1e4dc13bcdae48d98e00c (diff)
downloaddiscourse-umap-master.tar.gz
Change iframe srcHEADmaster
-rw-r--r--plugin.rb12
1 files changed, 2 insertions, 10 deletions
diff --git a/plugin.rb b/plugin.rb
index eaad5f3..a80a5c1 100644
--- a/plugin.rb
+++ b/plugin.rb
@@ -18,16 +18,8 @@ class Onebox::Engine::OpenStreetMapOnebox
def to_html
map_name, zoom, lat, lon = @url.match(@@REGEX).captures
- iframe_url = "//umap.openstreetmap.fr/fr/map/#{map_name}\##{zoom.to_i}/#{lat.to_f}/#{lon.to_f}"
-
- if marker = @url.match(/mlat=([-\d\.]+).+mlon=([-\d\.]+)/)
- mlat, mlon = marker.captures
- iframe_url = "#{iframe_url}&amp;marker=#{mlat}%2C#{mlon}"
- end
-
- if layers = @url.match(/layers=(\w+)/)
- iframe_url = "#{iframe_url}&amp;layers=#{layers.captures[0]}"
- end
+# iframe_url = "//umap.openstreetmap.fr/fr/map/#{map_name}\##{zoom.to_i}/#{lat.to_f}/#{lon.to_f}"
+ iframe_url = "//umap.openstreetmap.fr/fr/map/#{map_name}?scaleControl=false&miniMap=false&scrollWheelZoom=false&zoomControl=true&editMode=disabled&moreControl=true&searchControl=null&tilelayersControl=null&embedControl=null&datalayersControl=true&onLoadPanel=databrowser&captionBar=false&captionMenus=true"
"<iframe src='#{iframe_url}' style='border: 0' width='#{@@width}' height='#{@@height}' frameborder='0' scrolling='no'></iframe>"
end