マーカーの配列があり、各マーカーは1つ以上のカテゴリに属しています。
cat = Xのすべてのマーカーを取得するための検索/フィルターをどのように実装しますか?
例えば:
- cat = 9のすべてのマーカー?
- cat = 5および9のすべてのマーカー?
Gmaps.map.markers = [
{"id":9,"cat":"3, 5, 6","lat":"52.50","lng":"13.32"},
{"id":11,"cat":"3","lat":"52.51","lng":"13.44"},
{"id":12,"cat":"1, 2, 5","lat":"47.89","lng":"10.62"},
{"id":13,"cat":"1, 2, 3, 4, 5","lat":"47.77","lng":"10.61"},
{"id":15,"cat":"1, 6","lat":"40.60","lng":"-73.44"},
{"id":16,"cat":"1, 3, 5, 9","lat":"51.89","lng":"17.16"},
{"id":17,"cat":"9","lat":"52.37","lng":"9.73"}
];