you need to maintain several arrays of the icons according to their categories.
When the category is chosen, then go through the array one by one and set the map property of the marker:
Code:
for(var i = 0; i < oneCategories.length; i ++) {
oneCategories.setMap(map);
}
If you want to hide them:
Code:
for(var i = 0; i < oneCategories.length; i ++) {
oneCategories.setMap(null);
}
Last edited by Physicsguy; 04-27-2012 at 11:44 AM..
Reason: added [code] tags
|