I am trying to make custom Google maps. The idea is to make a map with 3 different markers for example: forest, river, lake.
I know how to add these custom markers. I do this with this tutorial, but I need to sort markers. For example when I press link “forest” in map will show only “forest” markers. Please help with this question, I try search in Google example, but found nothing that I need.
I simply keep a list / array of all markers for a similar scenario. Actually I have written a Javascript meta object for this purpose, so I can search for all markers of a particular type etc.
A very simple solution is to keep three lists, one for each type. So you can iterate over all lists and hide/display the markers as appropriate.
Edit 1: