我在地图上的自定义图像有问题。如何在Google地图自定义图标中添加圆形形状?
例如: 我的图标,以这种方式产生,并且图标包含图像:
var ic = { //icon
url: icon, // url
scaledSize: new google.maps.Size(30, 30), // scaled size
origin: new google.maps.Point(0,0), // origin
anchor: new google.maps.Point(0, 0), // anchor
//define the shape
//define the shape
shape:{coords:[17,17,18],type:'circle'},
//set optimized to false otherwise the marker will be rendered via canvas
//and is not accessible via CSS
optimized:false,
title: 'spot'
};
var marker = new google.maps.Marker({
map: map, title: name , position: latlngset, icon: ic
});
我想使我的图标,如CSS 50%半径(圆形)。 我该怎么做?
,谢谢,我有错 - 我尝试添加类为图标,不进标记。 –