![](/img/trans.png)
[英]how I can create a context menu with bootstrap when clicking on a marker google maps?
[英]How can I create a Directional(Angled) Marker in Google Maps?
我有標記的角度,我只想讓標記旋轉到那個角度。
marker = new google.maps.Marker({
position: myLatlng,
location: LocInfo,
map: map,
title: titleInfo,
icon: image,
html: text,
angle: 150 // i want to do something like this
});
是否可以像上面的示例一樣使用諸如angle屬性的任何屬性?
經過幾次搜索,我找到了答案,並且可以正常工作。
var angleDegrees = 150;
new google.maps.Marker({
position: a,
map: map,
icon: {
path: google.maps.SymbolPath.FORWARD_CLOSED_ARROW,
scale: 6,
fillColor: "red",
fillOpacity: 0.8,
strokeWeight: 2,
rotation: angleDegrees //this is how to rotate the pointer
}
});
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.