Following google documentation up to changing the marker icon was easy. But I\'m stuck, I don\'t know how to change image when marker is clicked?
My code so far:
I have modified the previous fiddle and enabled to deselect the marker.
http://jsfiddle.net/zsw76pq9/
google.maps.event.addListener( map,'click', function () { infoWindow.close(); //Change the marker icon marker.setIcon('https://www.google.com/mapfiles/marker_black.png'); });