So, if markers are hidden on the map, their sidebar item stays visible. I read through the entire gem, and I didn't see any functionality for also hiding the corresponding sidebar element. Anyone have a clue on this one?
function hide(category) {
var regEx = new RegExp("[" + category + "]")
for (var i=0; i<Gmaps.map.markers.length; i++) {
if (Gmaps.map.markers[i].cat) {
if (Gmaps.map.markers[i].cat.match(regEx)) {
Gmaps.map.hideMarker(Gmaps.map.markers[i]);
$('a#' + Gmaps.map.markers[i].id).closest('li').hide();
Gmaps.map.visibleInfoWindow.close();
}
}
}
// == clear the checkbox ==
document.getElementById(category+"box").checked = false;
}
did that... with a corresponding show method. works nicely!