14

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

      });
4

1 回答 1

45

fillOpacity 的默认值为 0。所以你应该把它设置为1:

fillOpacity: 1
于 2013-10-02T10:29:26.280 回答