1

当我们通过谷歌地图网站搜索路线时,像这样的路线:

http://goo.gl/maps/2mg8

谷歌地图会以漂亮的风格绘制路线,比如透明的浅蓝色。

现在我想模拟那种风格,比如,

new google.maps.Polyline({
   path: routePath,
   strokeColor: "#0000ff",
   strokeOpacity: 0.69,
   strokeWeight: 4
});

但是我发现模仿谷歌自己的风格是相当困难的。谁有类似的经验和帮助?谢谢你。

4

1 回答 1

2

我在代码中找到了这个:

q.ra=function(a,b,c,d,e){
    this.color=b||"#0000ff";
    this.weight=Ug(c,5);
    this.opacity=Ug(d,0.45);
    ...

所以合理的选择似乎是

strokeColor: "#0000ff",
strokeOpacity: 0.45,
strokeWeight: 5
于 2012-06-12T13:02:25.033 回答