I\'m attempting to make a Google Map which allows the user to check off a category and have those specific locations display. I\'ve got that part working:
http://the
Make an object var iconSrc = {}
Then, match categories to icon images to it.
iconSrc['Dial-a-ride'] = 'http://labs.google.com/ridefinder/images/mm_20_red.png';
iconSrc['American Legion'] = 'http://labs.google.com/ridefinder/images/mm_20_green.png';
...
when adding a marker, replace the icon image source with the new variable:
icon: iconSrc[locations[i][2]]
Here's a jsfiddle, the navigation is tough in the small pane so I moved the checkboxes to the top. http://jsfiddle.net/DA92S/1/