public final class MapPolyline extends MapObject
GeoPolyline
that
can be rendered on a map. A MapPolyline
has multiple points that combine to create its
path.MapObject.Type
Constructor and Description |
---|
MapPolyline(GeoPolyline polyline)
Creates a
MapPolyline , which is a MapObject in the shape of a polyline. |
Modifier and Type | Method and Description |
---|---|
int |
getLineColor()
Gets the current line color for this
MapPolyline , returning an ARGB
(Alpha/Red/Green/Blue) integer color value. |
int |
getLineWidth()
Returns the current line width for this
MapPolyline , in pixels. |
MapObject.Type |
getType()
Returns the type of object that this
MapObject represents. |
MapPolyline |
setLineColor(int color)
Sets a line color for this
MapPolyline , using an ARGB (Alpha/Red/Green/Blue) integer
color value. |
MapPolyline |
setLineWidth(int width)
Sets a line width, in pixels, for this
MapPolyline , an int value within the
[0..100] range. |
equals, getBaseType, getParent, getVisibleMask, getZIndex, hashCode, isVisible, resetVisibleMask, setVisible, setVisible, setVisible, setVisibleMask, setVisibleMask, setZIndex, unsetVisibleMask, unsetVisibleMask
public MapPolyline(GeoPolyline polyline)
MapPolyline
, which is a MapObject
in the shape of a polyline.polyline
- GeoPolyline
to construct the MapPolyline
.public MapPolyline setLineColor(int color)
MapPolyline
, using an ARGB (Alpha/Red/Green/Blue) integer
color value. The default line color is Color.BLUE
.color
- The ARGB integer color value. The packed integer is made up of 4 bytes: alpha,
red, green, blue. Each color component has a value range from [0..255] with 0
meaning no contribution for that component, and 255 meaning 100% contributionMapPolyline
itself.public int getLineColor()
MapPolyline
, returning an ARGB
(Alpha/Red/Green/Blue) integer color value.public MapPolyline setLineWidth(int width)
MapPolyline
, an int
value within the
[0..100] range. By default, the line width is 1.width
- Desired width of the line defining the MapPolyline
MapPolyline
itself.java.lang.IllegalArgumentException
- If width is out of range.public int getLineWidth()
MapPolyline
, in pixels.MapPolyline
public MapObject.Type getType()
MapObject
MapObject
represents.getType
in class MapObject
MapObject.Type
values