Closed sureshvickey closed 1 year ago
Me also getting the same error, any work around for this?
Now available on version 2.0.0
I'm still experiencing this on 2.0.0. It only works when running with --web-browser-flag "--disable-web-security".
I found the cause for the error. To make a request to Google Maps from a browser you must use the Javascript API. The Directions API doesn't support CORS and will return an XMLHttpRequest error when called from the client-side.
For now I made a workaround that uses the google_maps package to get the points and then uses the flutter_polyline_points decoder to generate LatLng coordinates.
getroutebetweencoordinates from flutter web creates XMLHttpRequest Error.