Here is my situation... there are array items with binary options like
- $item[0] = 0010
- $item[1] = 1000
- $item[2] = 0110
- $item[3] = 1101
each bit represents an option
I want to compare these options with the customer's requested option, let's say it's 0010
So, I need a logic to display only $item[0] and $item[2] because the second byte is 1. However, when there is no customer option check: 0000, then I must show all items
Only when some options are displayed should there be a filter...
I wish I paid more attention in math class... I am lost now, please help!
Note: This code snippet is from here: http://jsfiddle.net/yHxue/ but I'm having trouble understanding this line:
markers[m].setMap(((markers[m].props & props)>>>0===props)? ((props)?map:null): null);
, so I tried rewriting it, but mine doesn't work!