【发布时间】:2016-03-03 19:09:05
【问题描述】:
我确定这个问题已经得到解答,但我找不到。 如何在谷歌地图 v3 Javascript api 上更改标记的标记层?
例如,在下图中,我希望公共汽车图标出现在所有T 图标之上。
我的巴士图标是这样制作的:
var image = {
url: getIconUrl(bus.num),
anchor: new google.maps.Point(30,30)
};
var marker = new google.maps.Marker({
position: new google.maps.LatLng(bus.Latitude, bus.Longitude),
map: $scope.map,
animation: google.maps.Animation.DROP,
icon: image
});
我的T 图标是这样制作的:
var image = {
url: stopIcon
};
var marker = new google.maps.Marker({
position: new google.maps.LatLng(stop.Latitude, stop.Longitude),
map: $scope.map,
icon: image
});
总线总是在T 之后生成,因为T 存储在本地,总线是实时数据并按需提供服务。
【问题讨论】:
标签: javascript angularjs google-maps google-maps-api-3