Skip to content

Commit 7b3e34f

Browse files
committed
Rework map partial to not require the map's mappable to be passed in
1 parent 5fa0d08 commit 7b3e34f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/views/better_together/shared/_mappable_map.html.erb renamed to app/views/better_together/shared/_map.html.erb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11

2-
<%# locals: (mappable:, map: mappable.map)%>
2+
<%# locals: (map:)%>
33

44
<% if map %>
5-
<div class="map" id="<%= dom_id(mappable, :map) %>"
5+
<div class="map" id="<%= dom_id(map) %>"
66
data-controller="better_together--map"
77
data-better_together--map-center-value="<%= map.center_for_leaflet %>"
88
data-better_together--map-spaces-value="<%= map.leaflet_points %>"
99
data-better_together--map-zoom-value="<%= map.zoom %>"
1010
data-better_together--map-extent-value="<%= map.viewport %>">
1111
<div class="map-controls">
12-
<button class="btn btn-secondary" data-action="better_together--map#switchToOSM">OpenStreetMap</button>
12+
<button class="btn btn-secondary" data-action="better_together--map#switchToOSM">Map</button>
1313
<button class="btn btn-secondary" data-action="better_together--map#switchToSatellite">Satellite</button>
1414
<button class="btn btn-secondary" data-action="better_together--map#enableGeolocation">Geolocate Me</button>
1515
</div>

0 commit comments

Comments
 (0)