I taken some code form another post to start me off but trying to get it to do what I need. I need to set up functions to show/hide markers when they are checked and also to assign appropriate icons to the marker categories ie, Walk, Fish.
To start I need to get the show hide functions to work which currently aren’t.
You can find a demo here…http://jsfiddle.net/huMtu/
The problem you have is that the
locationsvariable is an array of information – its not actually the marker on the Google Map – that means that you cannot call the methodsetVisible()on it….What you need to do is store each of the markers in a separate array then call the
setVisiblemethod against the element of this new array …. I have updated the JSFiddle -> http://jsfiddle.net/huMtu/1/here is the JS part :
working fiddle (with publicly available icons)