diff options
Diffstat (limited to 'plugin.rb')
-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 |