введите описание изображения здесь
Я хочу изменить толщину линии маршрута. Я использую ТУТ Android SDK для начинающих. Следующий код не работает для меня.
// Method defined in Listener
public void onCalculateRouteFinished(RouteManager.Error error, List<RouteResult> routeResult) {
// If the route was calculated successfully
if (error == RouteManager.Error.NONE) {
final LinkedList<MapPolyline> m_polylines = new LinkedList<>();
// Render the route on the map
MapRoute mapRoute = new MapRoute(routeResult.get(0).getRoute());
mapRoute.setColor(R.color.colorPrimaryDark);
GeoBoundingBox boundingBox = new GeoBoundingBox(mMap.getCenter(), 1000, 1000);
// add boundingBox's top left and bottom right vertices to list of GeoCoordinates
List<GeoCoordinate> coordinates = new ArrayList<GeoCoordinate>();
coordinates.add(boundingBox.getTopLeft());
coordinates.add(boundingBox.getBottomRight());
// create GeoPolyline with list of GeoCoordinates
GeoPolyline geoPolyline = new GeoPolyline(coordinates);
MapPolyline polyline = new MapPolyline(geoPolyline);
polyline.setLineColor(Color.BLUE);
polyline.setLineWidth(12);
// add GeoPolyline to current active map
mMap.addMapObject(mapRoute);
m_polylines.add(polyline);
}
else {
// Display a message indicating route calculation failure
}
}