合并多个颜色,所以四天一直试图做两天现在是。谷歌地图标记是否有可能在一个svg
var arr = [
{
path: "M239.68,331.38c34.206,58.142,87.12,150.48,87.12,150.48s49.609-84.922,88.56-149.76C327.52,275.94,241.84,326.34,239.68,331.38z",
fillColor: 'red',
fillOpacity: 1,
anchor: new google.maps.Point(0, 0),
strokeWeight: 0,
scale: .6,
},
{
path: "M150 0 L75 200 L225 200 Z",
fillColor: 'black',
fillOpacity: 1,
anchor: new google.maps.Point(0, 0),
strokeWeight: 0,
scale: .6,
}
];
var marker = new google.maps.Marker({
position: location,
map: map,
draggable: false,
icon: arr,
zIndex: -20,
});
所以基本上什么IV一直试图做的是通过组合两个或两个以上svgs,并将它作为一个标记动态生成的SVG,这是可能的呢?有人知道吗?我想要风格唯一重要的属性是颜色,所以我有一个标记不止一种颜色。
这必须动态创建的,因此着色svgs前手不会是你是不是在你的代码中使用SVG的选项 – Wim
,这只是“ svg notation“,微妙但重要的区别 –
看看这里的第一个答案http://stackoverflow.com/questions/24413766/how-to-use-svg-markers-in-google-maps-api-v3 –