aboutsummaryrefslogtreecommitdiff
path: root/plugin.rb
diff options
context:
space:
mode:
Diffstat (limited to 'plugin.rb')
-rw-r--r--plugin.rb8
1 files changed, 4 insertions, 4 deletions
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