From 011f56dfc8e426d1db77fee830ea4900e5f50cda Mon Sep 17 00:00:00 2001 From: hellekin Date: Sun, 17 Mar 2024 13:01:50 +0100 Subject: Change iframe src --- plugin.rb | 12 ++---------- 1 file 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}&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" "" end -- cgit v1.2.3