maps.DirectionService is not a function google map react code example
Example: javascript link to google maps route
//https://www.google.com/maps/dir/?api=1¶meters
//The following example launches a map with bicycling directions from the Space Needle to Pike Place Market, in Seattle, WA.
//https://www.google.com/maps/dir/?api=1&origin=Space+Needle+Seattle+WA&destination=Pike+Place+Market+Seattle+WA&travelmode=bicycling