what I am trying to achieve is when ever i create a new marker it should have a different color.This is my $scope .
$scope.addRoute = function() {
console.log('addRoute');
var marker2 = new google.maps.Marker(
{
position: {lat: 52.02, lng: 10.56},
visible:true,
icon:'',
map: map,
draggable: true
});
directionsDisplay.setMap(map);
};
Copyright Notice:Content Author:「farhan」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/40901344/how-to-change-the-color-of-google-map-api-draggable-markers