2012-03-27 115 views
2

我也非常相似,這個例子的東西:谷歌地圖行車路線,改變筆觸顏色?

https://developers.google.com/maps/documentation/javascript/examples/directions-simple

所有我試圖做到這一點,從一個城市改線的行程到另一個城市,這是目前一個紫色?

我試圖把在則strokeColor myOptions,但沒有運氣:

 var myOptions = { 
     zoom:1, 
     strokeColor: "#000000", 
     mapTypeId: google.maps.MapTypeId.ROADMAP 
     } 
+2

已經回答了這裏:http://stackoverflow.com/questions/9311498/change-the-color-of-the-polyline-in-directionsrenderer – javram 2012-03-27 19:25:10

回答

1
+1

Boooooooooooooooooooooooooooooooo ......謝謝您的好意。 – Omni 2012-03-27 19:29:55

+1

這是一箇舊的帖子,它是暴露的,檢查在這裏:http://stackoverflow.com/questions/9311498/change-the-color-of-the-polyline-in-directionsrenderer – javram 2012-03-27 22:00:58

+0

javram - 這是好東西。這篇文章是V3和谷歌的傢伙......所以我認爲這是很好的去。感謝更新! – Trent 2012-03-28 01:57:32