bjorn2404 / jQuery-Store-Locator-Plugin

A store locator plugin using Google Maps API version 3
MIT License
495 stars 235 forks source link

Can we add OR operator to category filter ?? #235

Closed afrazahmmad closed 6 years ago

afrazahmmad commented 6 years ago

Thanks for making this robust plugin.

Issue: I want to show only those markers which are selected from category filter. Right now your Category Filter filters markers with and operator but I want to use it as or operator. Can you please explain how to achieve this feature ??

afrazahmmad commented 6 years ago

I found solution for my requirement I am working on a project (http://voddemo.akkastech.com/category/2) to make a store locator using this plugin. By default, this plugin applies AND operator on category filters but I wanted OR operator so that I can show all those markers that falls under selected filters. Luckily, I found regular expression in this plugin which applied filter using AND operator. I just changed .join('') to join('|') and OR operator on category filter was successfully applied.

bjorn2404 commented 6 years ago

@afrazahmmad The "exclusiveFiltering" setting is actually set up to make this switch. You'd set the value to true for "OR" functionality.

afrazahmmad commented 6 years ago

Last night I was reading your plugin code and I saw exclusiveFiltering and I said wow this man have done a really great job. Thanks for the BEST plugin for store locator.