【发布时间】:2015-11-16 20:24:13
【问题描述】:
我正在尝试在我的应用程序中使用 angular google maps(http://angular-ui.github.io/angular-google-maps/) 指令,因此将我的代码转换为使用该指令并在该过程中坚持以将自定义形状应用于标记。
任何熟悉 angular google maps 的人都可以帮我解决这个问题,请检查下面提到的用普通 google maps 库编写的代码,并告诉我如何使该代码与 angular google maps 指令一起使用。
new google.maps.Marker({
position: latLng,
map: map,
icon: {
url: 'path/to/icon',
origin:new google.maps.Point(0,0),
anchor:new google.maps.Point(3,4)
},
shape: {
coords:[0, 6, 7, 0, 16, 0, 23, 6, 12, 12],
type:"poly"
}
});
【问题讨论】:
标签: angularjs google-maps google-maps-api-3 angular-google-maps