I'm working on a project and I want to implement road traffic and estimated time on a specified route, like the Google map. .![Like this image ]1
if (direction.isOK()) {
Route route = direction.getRouteList().get(0);
ArrayList<LatLng> directionPositionList = route.getLegList().get(0).getDirectionPoint();
polyline = mGoogleMap.addPolyline(DirectionConverter.createPolyline(mActivity, directionPositionList, 5
, Color.BLUE));
setCameraWithCoordinationBounds(route);
Leg leg = route.getLegList().get(0);
Info distanceInfo = leg.getDistance();
Info durationInfo = leg.getDuration();
String distance = distanceInfo.getText();
String duration = durationInfo.getText();
}
from How to show traffic and estimate time on the map route like google map?
No comments:
Post a Comment