私はマップ上のカスタムイメージに問題があります。例えば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%の半径(円形)のように、私のアイコンを作りたいです。 どうすればいいですか?
おかげで、私はミスを持っている - 私は、アイコンに、ではないマーカーに追加されたクラスにしてみてください。 –