How to call all options in only one mode? Example: hide("house, building, clothes") or hide("house","building","clothes")... Is possible?
// == shows all markers of a particular category and ensures the checkbox is checked
function show(category) {
for (var i=0; i<locations.length; i++) {
if (locations[i][2] == category) {
markers[i].setVisible(true);
}
}
}
// hides all markers of a particular category and ensures the checkbox is cleared
function hide(category) {
for (var i=0; i<locations.length; i++) {
if (locations[i][2] == category) {
markers[i].setVisible(false);
}
}
}
// show or hide the categories initially
hide("house");
hide("building");
hide("clothes");
Thanks all :)