谷歌地图svg图标

时间:2015-10-30 14:34:48

标签: google-maps svg

我可以使用以下代码获得1.png enter image description here

path: 'M44.6,7.162h-3.379v11.625h1.351v5.338h-2.568V6.487C40.005,2.904,37.1,0,33.517,0H12.162C8.58,0,5.675,2.904,5.675,6.487v17.3h-2.23v-5.678h1.419V6.487H1.486v11.622h1.419v6.22h2.77v12.705c0,2.454,1.366,4.593,3.379,5.694v3.358h5.676V43.52h16.083v2.567h5.678v-3.294c2.086-1.076,3.513-3.251,3.513-5.76V24.664h3.109v-5.878h1.487L44.6,7.162L44.6,7.162z M15.407,1.35h15.136v3.516H15.407V1.35z M17.028,36.762H8.649V32.98h8.379V36.762zM37.301,36.762h-8.379V32.98h8.379V36.762z M37.301,24.598c0,0-1.622,5.137-14.596,5.137c-12.976,0-14.328-5.137-14.328-5.137V6.756h28.924V24.598z',
  fillColor: '#000',
  fillOpacity: 1,
  scale: 1,
  strokeColor: '#333',
  strokeWeight: 1

有可能获得2.png吗? enter image description here

我想填充要填充WHITE的图标的透明部分。我怎样才能做到这一点?

1 个答案:

答案 0 :(得分:0)

我无法弄清楚如何通过编辑Path String并在其后面添加一个Rect来填充路径。所以,我发现我们可以插入一个完整的SVG作为标记。

`http://jsfiddle.net/ttLu41ok/`

此处有更多信息 - How to use SVG markers in Google Maps API v3