Generalize to multiple travelers (and)
This commit is contained in:
parent
7a8989a7a3
commit
99eca0cb8f
1 changed files with 6 additions and 2 deletions
|
|
@ -131,12 +131,16 @@
|
|||
function filterMarkersByTravelers(travelers){
|
||||
for(var i=0; i<markers.length; i++){
|
||||
markers[i].setVisible(false);
|
||||
var all_there = true;
|
||||
for(var j=0; j<travelers.length; j++){
|
||||
if(markers[i]['traveler'].indexOf(travelers[j]) > -1){
|
||||
markers[i].setVisible(true);
|
||||
if(markers[i]['traveler'].indexOf(travelers[j]) == -1){
|
||||
all_there = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(all_there){
|
||||
markers[i].setVisible(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue