From cf0271a91aa46c0161afa9dcc0a58cb923b35af8 Mon Sep 17 00:00:00 2001 From: hellekin Date: Sun, 17 Mar 2024 12:23:58 +0100 Subject: Fix URL --- plugin.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'plugin.rb') diff --git a/plugin.rb b/plugin.rb index 3deae46..972a2f4 100644 --- a/plugin.rb +++ b/plugin.rb @@ -1,6 +1,6 @@ -# name: OpenStreetMap Onebox -# version: 0.2 -# authors: Marcin Rataj +# name: OpenStreetMap.fr UMAP Onebox +# version: 0.2.1 +# authors: Marcin Rataj, hellekin class Onebox::Engine::OpenStreetMapOnebox include Onebox::Engine @@ -16,7 +16,7 @@ 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}?bbox=#{get_bbox(lat.to_f, lon.to_f, zoom.to_i)}" + 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 -- cgit v1.2.3