my code is like :
Marker = new google.maps.Marker({
position: new google.maps.LatLng(locations[i][1], locations[i][2]),
map: map,
icon: locations[i][5] === 'Red' ? red_icon : locations[i][5] === 'Purple' ?
purple_icon : blue_icon
});
i set condition for the icon if red then it will be use the red icon if purple then purple icon else it will be use blue for all otherwise.... ** my problem when i add another condition the code didn't work anymore... like :
icon: locations[i][5] === 'Red' ? red_icon : locations[i][5] === 'Purple' ?
purple_icon : locations[i][5] === 'blue' ? blue_icon : green_icon