Relative Content

Tag Archive for reactjsreact-google-maps-api

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.