How to clear a specific polyline (DirectionsRender) from google map using react-google-maps/api?
I am trying to integrate google map with DirectionsService. I have drawn multiple routes on the maps. But i have to remove particular route from the map on the button click. How its possible? I tried the below code. I am using ReactJS
Drawing multiple routes using react-google-maps/api DirectionsRender misbehaving
I am trying to draw multiple routes in google map using react-google-maps/api. Here i am using DirectionServices and DirectionsRender component to draw the routes. The problem i am facing is, if i have multiple routes direction service data in an array and loop the array to bind the DirectionsRender, only last index route drawing perfectly. first index route not displaying.Please see the code structure i am following.