Finding it hard to get clear information on this but what I am trying to achieve is fitBounds on visible markers.
The Array defines the title, category, lat/long and hre
well, you could program that inside your show
function, I created own fiddle for you which demonstrates how to set 2 markers visible from array of 3 markers and fitBounds for only those:
fiddle example
Since code is now visible, with your case you could make separate fitBoundsToVisibleMarkers()
method to be runned always after show()
and hide()
methods. for example:
function fitBoundsToVisibleMarkers() {
var bounds = new google.maps.LatLngBounds();
for (var i=0; i
and your code does this:
function show(category) {
for (var i=0; i