Class Polyline
java.lang.Object
com.codename1.maps.MapObject
com.codename1.maps.Polyline
A connected sequence of line segments drawn on a map. Add one through
MapSurface.addPolyline(Polyline).-
Constructor Summary
ConstructorsConstructorDescriptionPolyline()Creates an empty polyline; append vertices withaddPoint(LatLng).Creates a polyline through the supplied vertices (defensively copied). -
Method Summary
Modifier and TypeMethodDescriptionAppends a vertex.The live list of vertices (LatLng).intThe stroke opacity in [0,255].intThe stroke color as 0xRRGGBB.intThe stroke width in pixels.booleanWhether the polyline is rendered.setStrokeAlpha(int strokeAlpha) Sets the stroke opacity in [0,255].setStrokeColor(int strokeColor) Sets the stroke color as 0xRRGGBB.setStrokeWidth(int strokeWidth) Sets the stroke width in pixels.setVisible(boolean visible) Shows or hides the polyline.
-
Constructor Details
-
Polyline
public Polyline()Creates an empty polyline; append vertices withaddPoint(LatLng). -
Polyline
Creates a polyline through the supplied vertices (defensively copied).
-
-
Method Details
-
addPoint
-
getPoints
-
getStrokeColor
public int getStrokeColor()The stroke color as 0xRRGGBB. -
setStrokeColor
Sets the stroke color as 0xRRGGBB. -
getStrokeWidth
public int getStrokeWidth()The stroke width in pixels. -
setStrokeWidth
Sets the stroke width in pixels. -
getStrokeAlpha
public int getStrokeAlpha()The stroke opacity in [0,255]. -
setStrokeAlpha
Sets the stroke opacity in [0,255]. -
isVisible
public boolean isVisible()Whether the polyline is rendered. -
setVisible
Shows or hides the polyline.
-