diff options
author | hellekin <how@cepheide.org> | 2024-03-17 12:23:58 +0100 |
---|---|---|
committer | hellekin <how@cepheide.org> | 2024-03-17 12:24:32 +0100 |
commit | cf0271a91aa46c0161afa9dcc0a58cb923b35af8 (patch) | |
tree | 16ea170cd54516a1d86343cadb75702bae98167b | |
parent | 2b9fbf4cf5534defb6b0890269f4c33ab9ce9336 (diff) | |
download | discourse-umap-cf0271a91aa46c0161afa9dcc0a58cb923b35af8.tar.gz |
Fix URL
-rw-r--r-- | plugin.rb | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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 |