beewuu beewuu - 6 months ago 53
Javascript Question

change google map marker color to a color of my choice

Is there anyway to change from the default red marker color to a hexidecimal color of my choice? I've been looking all over stack overflow and I haven't seem to find an answer. This is what I have so far.

var marker = new google.maps.Marker({
position: myLatLng,
label: '23',
map: map


the marker don't have a color property/attribute .. the markers use icon so you can canghe color changing icon

this is from google-maps dev

var image = '';
var beachMarker = new google.maps.Marker({
   position: {lat: -33.890, lng: 151.274},
   map: map,
   icon: image