Class MapPolyline.SolidRepresentation
Class MapPolyline.SolidRepresentation
- java.lang.Object
-
- com.here.NativeBase
-
- com.here.sdk.mapview.MapItemRepresentation
-
- com.here.sdk.mapview.MapPolyline.Representation
-
- com.here.sdk.mapview.MapPolyline.SolidRepresentation
-
- Enclosing class:
- MapPolyline
public static final class MapPolyline.SolidRepresentation extends MapPolyline.Representation
Representation for a solid line without outline.
Can represent polylines that have constant width or width dependent on the map zoom.
To achieve constant width lines, use
MapMeasureDependentRenderSizewith a single value.To achieve line width dependent on map zoom, use
MapMeasureDependentRenderSizewith multiple values.For
MapMeasure.KindonlyMapMeasure.Kind.ZOOM_LEVELis supported.For
RenderSize.UnitonlyRenderSize.Unit.PIXELSis supported.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.here.sdk.mapview.MapPolyline.Representation
MapPolyline.Representation.InstantiationErrorCode, MapPolyline.Representation.InstantiationException
-
-
Constructor Summary
Constructors Constructor Description SolidRepresentation(MapMeasureDependentRenderSize lineWidth, Color color, LineCap capShape)Creates a representation for a solid line without outline.SolidRepresentation(MapMeasureDependentRenderSize lineWidth, Color color, MapMeasureDependentRenderSize outlineWidth, Color outlineColor, LineCap capShape)Creates a representation for a solid line with outline.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LineCapgetCapShape()Returns the cap shape of the polyline and its outline.ColorgetLineColor()Gets the color of the polyline.MapMeasureDependentRenderSizegetLineWidth()Gets the map measure dependent polyline width.ColorgetOutlineColor()Gets the color of outline of the polyline.MapMeasureDependentRenderSizegetOutlineWidth()Gets the map measure dependent polyline outline width.
-
-
-
Constructor Detail
-
SolidRepresentation
public SolidRepresentation(@NonNull MapMeasureDependentRenderSize lineWidth, @NonNull Color color, @NonNull LineCap capShape) throws MapPolyline.Representation.InstantiationExceptionCreates a representation for a solid line without outline.
At map measures smaller than smallest map measure in the
lineWidthline width is constant and equal to the width given for the smallest map measure in thelineWidth.At map measures bigger than biggest map measure in the
lineWidthline width is constant and equal to the width given for the biggest map measure in thelineWidth.At map measures between two nearest given map measures line width is linearly interpolated between width values given for these map measures.
For
MapMeasure.KindonlyMapMeasure.Kind.ZOOM_LEVELis supported.For
RenderSize.UnitonlyRenderSize.Unit.PIXELSis supported.lineWidthmust not be 0 (lineWidth.sizeswith all values set to 0.0).- Parameters:
lineWidth-The width of the polyline depending on the map measure.
color-The color of the polyline.
capShape-The cap shape applied to both ends of the polyline.
- Throws:
MapPolyline.Representation.InstantiationException-In case of invalid input parameters.
-
SolidRepresentation
public SolidRepresentation(@NonNull MapMeasureDependentRenderSize lineWidth, @NonNull Color color, @NonNull MapMeasureDependentRenderSize outlineWidth, @NonNull Color outlineColor, @NonNull LineCap capShape) throws MapPolyline.Representation.InstantiationExceptionCreates a representation for a solid line with outline.
The total width of the polyline is
line width + 2 * outline width.At map measures smaller than smallest map measure in the
lineWidthandoutlineWidth, the value is constant and equal to the width given for the smallest map measure in thelineWidthandoutlineWidth.At map measures bigger than biggest map measure in the
lineWidthandoutlineWidth, the value is constant and equal to the width given for the biggest map measure in thelineWidthandoutlineWidth.At map measures between two nearest given map measure is linearly interpolated between width values given for these map measures.
For
MapMeasure.KindonlyMapMeasure.Kind.ZOOM_LEVELis supported.For
RenderSize.UnitonlyRenderSize.Unit.PIXELSis supported.lineWidthmust not be 0 (lineWidth.sizeswith all values set to 0.0).- Parameters:
lineWidth-The width of the polyline depending on the map measure.
color-The color of the polyline.
outlineWidth-The width of the outline on one side of the polyline depending on the map measure.
outlineColor-The outline color of the polyline.
capShape-The cap shape applied to both ends of the polyline.
- Throws:
MapPolyline.Representation.InstantiationException-In case of invalid input parameters.
-
-
Method Detail
-
getLineWidth
@NonNull public MapMeasureDependentRenderSize getLineWidth()
Gets the map measure dependent polyline width.
At map measures smaller than smallest map measure in the
lineWidthline width is constant and equal to the width given for the smallest map measure in thelineWidth.At map measures bigger than biggest map measure in the
lineWidthline width is constant and equal to the width given for the biggest map measure in thelineWidth.At map measures between two nearest given map measures, the values are linearly interpolated between values given for these map measures.
- Returns:
The width of the polyline depending on the map measure.
-
getLineColor
@NonNull public Color getLineColor()
Gets the color of the polyline.
- Returns:
The color of the polyline.
-
getOutlineWidth
@NonNull public MapMeasureDependentRenderSize getOutlineWidth()
Gets the map measure dependent polyline outline width.
The total width of the polyline is
line width + 2 * outline width.At map measures smaller than smallest map measure in the
outlineWidth, outline width is constant and equal to the width given for the smallest map measure in theoutlineWidth.At map measures bigger than biggest map measure in the
outlineWidth, outline width is constant and equal to the width given for the biggest map measure in theoutlineWidth.At map measures between two nearest given map measures, the values are linearly interpolated between values given for these map measures.
- Returns:
The width of the outline on one side of the polyline depending on the map measure.
-
getOutlineColor
@NonNull public Color getOutlineColor()
Gets the color of outline of the polyline.
- Returns:
The outline color of the polyline.
-
getCapShape
@NonNull public LineCap getCapShape()
Returns the cap shape of the polyline and its outline.
- Returns:
The cap shape applied to both ends of the polyline and its outline.
-
-