Directory: Featured Listings 

Hide map
' + '
' // + locations[i][4] + '
' + '
' + 'Read more' + '
' + '
' ); infowindow.open(map, marker); } })(marker, i)); markers.push(marker); //extend the bounds to include each marker's position bounds.extend(marker.position); } //now fit the map to the newly inclusive bounds map.fitBounds(bounds); google.maps.event.addListenerOnce(map, 'bounds_changed', function(event) { limitMaxZoom(); }); // Clustering var options = { gridSize: 25, imagePath: 'https://allgoodlawyers.org/media/com_mtree/images/m' }; var markerCluster = new MarkerClusterer(map, markers, options); jQuery(".toggleMap").on("click", function () { jQuery("#map").slideToggle("slow", function() { google.maps.event.trigger(map, "resize"); map.fitBounds(bounds); limitMaxZoom(); }); jQuery("span", this).text(jQuery("span",this).text() == "Hide map" ? "Show map" : "Hide map"); return false; }); function limitMaxZoom(){ var maxZoom = 14; if (map.getZoom() > maxZoom) { map.setZoom(maxZoom); } }