Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot FillColor in Google Maps Symbols (svg) marker

I am using Google Maps Symbols as markers for my map. Specifically, I'm using the predefined Circle symbol. However, the circle appear hollow from inside. fillColor is ignored but strokeColor works.

Is it possible to fill the circle with color?

var marker = new google.maps.Marker({
          position: myLatlng,
          icon: {
            path: google.maps.SymbolPath.CIRCLE,
            scale: 4,
            strokeWeight: 2,
            fillColor: colors[parseInt(idx)],
            strokeColor: colors[parseInt(idx)]
          },
          map: map

      });
like image 982
Jabran Saeed Avatar asked Oct 02 '13 10:10

Jabran Saeed


1 Answers

The default value for fillOpacity is 0. So you should set it to 1:

fillOpacity: 1
like image 118
Archy Will He 何魏奇 Avatar answered Oct 11 '22 19:10

Archy Will He 何魏奇