At present when a new marker is added to the map, it will automatically zoom into that new location.
How can I configure gmaps4rails to respond to a button that will automatically zoom out to view all the markers on the map? as below:
The configuration I have for rendering is:
allLocations = root.table.rows(".selected").data()
$('#multi_markers').map ->
handler = Gmaps.build("Google")
handler.buildMap
internal:
id: "multi_markers"
, ->
for aLocation in allLocations
markers = handler.addMarkers([
{
lat: aLocation[9]
lng: aLocation[10]
}
])
handler.bounds.extendWith markers
handler.fitMapToBounds()
return
Note this is pertaining to gmaps4rails not simply gmaps