Page Summary
-
NavigationRoadStretchRenderingData.Builderhelps createNavigationRoadStretchRenderingDataobjects for visualizing road stretches. -
It provides methods to set the length, offset, and rendering style of the road stretch.
-
You can initialize the builder from scratch or using a Google Maps
RoadStretchobject. -
The
build()method creates the finalNavigationRoadStretchRenderingDatainstance. -
It allows customizing the visual representation of traffic conditions on a specific road segment.
A Builder class for constructing instances of NavigationRoadStretchRenderingData.
Public Constructor Summary
|
Builder()
Creates an empty builder.
|
|
|
Builder(TrafficData.VisualTrafficReportPolylineRendering.RoadStretch roadStretch)
Creates a builder from an instance of the Google Maps
RoadStretch. |
Public Method Summary
| NavigationRoadStretchRenderingData |
build()
Creates and returns a new instance of
NavigationRoadStretchRenderingData using the
attributes from the Builder object. |
| NavigationRoadStretchRenderingData.Builder |
setLengthMeters(int lengthMeters)
Sets the length of the road stretch, in meters.
|
| NavigationRoadStretchRenderingData.Builder |
setOffsetMeters(int offsetMeters)
Sets the offset of the road stretch relative to the start of the polyline within which the
road stretch is defined, in meters.
|
| NavigationRoadStretchRenderingData.Builder |
setStyle(NavigationRoadStretchRenderingData.Style style)
Sets the rendering style for the road stretch.
|
| NavigationRoadStretchRenderingData.Builder |
setStyle(TrafficData.VisualTrafficReportPolylineRendering.RoadStretch.Style style)
Sets the rendering style for the road stretch as an equivalent of the Google Maps road
stretch rendering style.
|
Inherited Method Summary
Public Constructors
public Builder ()
Creates an empty builder.
public Builder (TrafficData.VisualTrafficReportPolylineRendering.RoadStretch roadStretch)
Creates a builder from an instance of the Google Maps RoadStretch.
Parameters
| roadStretch |
|---|
Public Methods
public NavigationRoadStretchRenderingData build ()
Creates and returns a new instance of NavigationRoadStretchRenderingData using the
attributes from the Builder object.
Returns
- a new NavigationRoadStretchRenderingData instance.
public NavigationRoadStretchRenderingData.Builder setLengthMeters (int lengthMeters)
Sets the length of the road stretch, in meters.
Parameters
| lengthMeters | length of the road stretch. |
|---|
Returns
- the object upon which the method was called, with the updated length.
public NavigationRoadStretchRenderingData.Builder setOffsetMeters (int offsetMeters)
Sets the offset of the road stretch relative to the start of the polyline within which the road stretch is defined, in meters.
Parameters
| offsetMeters | offset of the road stretch from the start of the polyline. |
|---|
Returns
- the object upon which the method was called, with the updated offset.
public NavigationRoadStretchRenderingData.Builder setStyle (NavigationRoadStretchRenderingData.Style style)
Sets the rendering style for the road stretch. This is the style that will be applied on the road stretch by clients to indicate the amount of traffic along it.
Parameters
| style | the style that should be applied to the road stretch when rendered. |
|---|
Returns
- the object upon which the method was called, with the updated rendering style.
public NavigationRoadStretchRenderingData.Builder setStyle (TrafficData.VisualTrafficReportPolylineRendering.RoadStretch.Style style)
Sets the rendering style for the road stretch as an equivalent of the Google Maps road stretch rendering style. This is the style that will be applied on the road stretch by clients to indicate the amount of traffic along it.
Parameters
| style | the style that should be applied to the road stretch when rendered, as an instance of the Google Maps road stretch rendering style. |
|---|
Returns
- the object upon which the method was called, with the updated rendering style.