remove route with google map

后端 未结 8 1942
半阙折子戏
半阙折子戏 2020-12-03 20:29

I got a small app that use the Direction Service feature of Google Map. It is working well, I can change routes, but I have a small problem, where a user could go back to a

相关标签:
8条回答
  • 2020-12-03 21:25

    if you are using DirectionsRenderer to display the routes, you can call setMap(null) on it too. That way you delete the displayed route.

    Using the example code here http://code.google.com/apis/maps/documentation/javascript/examples/directions-simple.html

    just call

    directionsDisplay.setMap(null);
    
    0 讨论(0)
  • 2020-12-03 21:26

    set strokeWeight: 0 then polyline will hide

    0 讨论(0)
提交回复
热议问题