diff options
author | hellekin <how@cepheide.org> | 2024-03-17 13:01:50 +0100 |
---|---|---|
committer | hellekin <how@cepheide.org> | 2024-03-17 13:01:50 +0100 |
commit | 011f56dfc8e426d1db77fee830ea4900e5f50cda (patch) | |
tree | f736f45a2283a6d2c2f587fa616147416bc473b4 | |
parent | f6f88b65f153457214a1e4dc13bcdae48d98e00c (diff) | |
download | discourse-umap-master.tar.gz |
-rw-r--r-- | plugin.rb | 12 |
1 files changed, 2 insertions, 10 deletions
@@ -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}&marker=#{mlat}%2C#{mlon}" - end - - if layers = @url.match(/layers=(\w+)/) - iframe_url = "#{iframe_url}&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 |