change the color of the polyline in DirectionsRenderer

前端 未结 4 1064
-上瘾入骨i
-上瘾入骨i 2021-02-09 17:29

i\'ve integrated a map and i want to display the route directions between two locations. everything is working fine and the directions is displayed perfectly , but i want to cha

4条回答
  •  花落未央
    2021-02-09 17:35

    @Seacat, after you update the directionsRenderer with the new polylineOptions, you have to re-render the directions response which is stored inside the renderer object..

    directionsRenderer.setDirections(directionsRenderer.directions);
    

提交回复
热议问题