Reputation: 33
How does app like Uber and others show two location on screen and the path between them? Does google provide that functionality to developers or is it proprietary?
Upvotes: 1
Views: 2177
Reputation: 6171
You can use this package to draw routes with google maps. You can use the helper methods like these:
await googleMapPolyline.getCoordinatesWithLocation(
origin: LatLng(40.677939, -73.941755),
destination: LatLng(40.698432, -73.924038),
mode: RouteMode.driving);
and
await googleMapPolyline.getPolylineCoordinatesWithAddress(
origin: '55 Kingston Ave, Brooklyn, NY 11213, USA',
destination: '8007 Cypress Ave, Glendale, NY 11385, USA',
mode: RouteMode.driving);
to make a route between points.
Upvotes: 4