Browse Source

Merge branch 'feature/zoom-bbox' into develop

* feature/zoom-bbox:
  Zoom to the collection bounding box instead of the entire cities bbox
tags/0.3.6^2
Bèr Kessels 1 month ago
parent
commit
1dd3e727a8
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      app/views/region.erb

+ 2
- 2
app/views/region.erb View File

@@ -58,8 +58,8 @@
js += "markers.push(L.marker([#{place.geometry.y}, #{place.geometry.x}], {icon: #{icon}}).addTo(map).bindPopup('#{popup_content}'));"
end

#js += "map.fitBounds([[#{@region.bbox[1]}, #{@region.bbox[0]}], [#{@region.bbox[3]}, #{@region.bbox[2]}]]);"
js += "var group = L.featureGroup(markers);"
js += "map.fitBounds(group.getBounds());"
set_content_for(:closing_js, js)
%>


Loading…
Cancel
Save