I am trying make a map that filters markers based on certain parameters. initially I have 2 dropdown filter and one input filter. the input filter numbers only. my Array looks like :
['Belmont', 42.4135648, -83.1775028, 'A', '48227, 48235, 48219, 48223', 'Female', 'veteran'],
now I would like to simplify the work by combining my parameters all together, my new array will look similar to below:
['Belmont', 42.4135648, -83.1775028, 'A', '48227, 48235, 48219, 48223 , Female ,veteran'],
I get all these filters to work separate, example as below.
https://jsfiddle.net/gf9o3k0q/2/
so I have my code:
if (
(gender == "All" || marker.gender == gender) &&
(people == "All" || marker.people == people) &&
(serviceSearchTerm !== null && serviceSearchRegx.test(marker.service))
) visible = true;
change to only:
if (
(serviceSearchTerm !== null && serviceSearchRegx.test(marker.service))
) visible = true;
nothing shows after my type in any of the values. I would like users to only enter one the values in that parameter. such as they only type in Female, or Veteran, or 48337 for that point to show.
any help would be appreciated