我如何设置谷歌地图折线的颜色?
var myRoutePath;
myRoutePath = new google.maps.Polyline({
path: routeCoordinates,
strokeColor: "#CC33FF",
strokeWeight: 3
});
myRoutePath.setMap(map);
// Reset colour
myRoutePath.setOptions({strokeColor: 'blue'});
以上内容在Firebug中不会显示为错误,但也不会改变颜色。
感谢您的帮助。