-
public class LineOptions extends Options<Line>
Builder class from which a line is created.
-
-
Field Summary
Fields Modifier and Type Field Description private JsonElementdataprivate LineStringgeometryprivate StringlineJoinprivate FloatlineOpacityprivate StringlineColorprivate FloatlineWidthprivate FloatlineGapWidthprivate FloatlineOffsetprivate FloatlineBlurprivate StringlinePattern
-
Method Summary
Modifier and Type Method Description JsonElementgetData()Get the arbitrary json data of the annotation. LineStringgetGeometry()Get the geometry of the line, which represents the location of the line on the map StringgetLineJoin()Get the current configured line-join for the lineThe display of lines when joining. FloatgetLineOpacity()Get the current configured line-opacity for the lineThe opacity at which the line will be drawn. StringgetLineColor()Get the current configured line-color for the lineThe color with which the line will be drawn. FloatgetLineWidth()Get the current configured line-width for the lineStroke thickness. FloatgetLineGapWidth()Get the current configured line-gap-width for the lineDraws a line casing outside of a line's actual path. FloatgetLineOffset()Get the current configured line-offset for the lineThe line's offset. FloatgetLineBlur()Get the current configured line-blur for the lineBlur applied to the line, in density-independent pixels. StringgetLinePattern()Get the current configured line-pattern for the lineName of image in sprite to use for drawing image lines. LineOptionswithLineJoin(String lineJoin)Set line-join to initialise the line with. LineOptionswithLineOpacity(Float lineOpacity)Set line-opacity to initialise the line with. LineOptionswithLineColor(String lineColor)Set line-color to initialise the line with. LineOptionswithLineWidth(Float lineWidth)Set line-width to initialise the line with. LineOptionswithLineGapWidth(Float lineGapWidth)Set line-gap-width to initialise the line with. LineOptionswithLineOffset(Float lineOffset)Set line-offset to initialise the line with. LineOptionswithLineBlur(Float lineBlur)Set line-blur to initialise the line with. LineOptionswithLinePattern(String linePattern)Set line-pattern to initialise the line with. LineOptionswithLatLngs(List<LatLng> latLngs)Set a list of LatLng for the line, which represents the locations of the line on the map List<LatLng>getLatLngs()Get a list of LatLng for the line, which represents the locations of the line on the map LineOptionswithGeometry(LineString geometry)Set the geometry of the line, which represents the location of the line on the map booleangetDraggable()Returns whether this line is draggable, meaning it can be dragged across the screen when touched and moved. LineOptionswithDraggable(boolean draggable)Set whether this line should be draggable,meaning it can be dragged across the screen when touched and moved. LineOptionswithData(@Nullable() JsonElement jsonElement)Set the arbitrary json data of the annotation. -
-
Method Detail
-
getGeometry
LineString getGeometry()
Get the geometry of the line, which represents the location of the line on the map
-
getLineJoin
String getLineJoin()
Get the current configured line-join for the line
The display of lines when joining.
-
getLineOpacity
Float getLineOpacity()
Get the current configured line-opacity for the line
The opacity at which the line will be drawn.
-
getLineColor
String getLineColor()
Get the current configured line-color for the line
The color with which the line will be drawn.
-
getLineWidth
Float getLineWidth()
Get the current configured line-width for the line
Stroke thickness.
-
getLineGapWidth
Float getLineGapWidth()
Get the current configured line-gap-width for the line
Draws a line casing outside of a line's actual path. Value indicates the width of the inner gap.
-
getLineOffset
Float getLineOffset()
Get the current configured line-offset for the line
The line's offset. For linear features, a positive value offsets the line to the right, relative to the direction of the line, and a negative value to the left. For polygon features, a positive value results in an inset, and a negative value results in an outset.
-
getLineBlur
Float getLineBlur()
Get the current configured line-blur for the line
Blur applied to the line, in density-independent pixels.
-
getLinePattern
String getLinePattern()
Get the current configured line-pattern for the line
Name of image in sprite to use for drawing image lines. For seamless patterns, image width must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.
-
withLineJoin
LineOptions withLineJoin(String lineJoin)
Set line-join to initialise the line with.
The display of lines when joining.
- Parameters:
lineJoin- the line-join value
-
withLineOpacity
LineOptions withLineOpacity(Float lineOpacity)
Set line-opacity to initialise the line with.
The opacity at which the line will be drawn.
- Parameters:
lineOpacity- the line-opacity value
-
withLineColor
LineOptions withLineColor(String lineColor)
Set line-color to initialise the line with.
The color with which the line will be drawn.
- Parameters:
lineColor- the line-color value
-
withLineWidth
LineOptions withLineWidth(Float lineWidth)
Set line-width to initialise the line with.
Stroke thickness.
- Parameters:
lineWidth- the line-width value
-
withLineGapWidth
LineOptions withLineGapWidth(Float lineGapWidth)
Set line-gap-width to initialise the line with.
Draws a line casing outside of a line's actual path. Value indicates the width of the inner gap.
- Parameters:
lineGapWidth- the line-gap-width value
-
withLineOffset
LineOptions withLineOffset(Float lineOffset)
Set line-offset to initialise the line with.
The line's offset. For linear features, a positive value offsets the line to the right, relative to the direction of the line, and a negative value to the left. For polygon features, a positive value results in an inset, and a negative value results in an outset.
- Parameters:
lineOffset- the line-offset value
-
withLineBlur
LineOptions withLineBlur(Float lineBlur)
Set line-blur to initialise the line with.
Blur applied to the line, in density-independent pixels.
- Parameters:
lineBlur- the line-blur value
-
withLinePattern
LineOptions withLinePattern(String linePattern)
Set line-pattern to initialise the line with.
Name of image in sprite to use for drawing image lines. For seamless patterns, image width must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.
- Parameters:
linePattern- the line-pattern value
-
withLatLngs
LineOptions withLatLngs(List<LatLng> latLngs)
Set a list of LatLng for the line, which represents the locations of the line on the map
- Parameters:
latLngs- a list of the locations of the line in a longitude and latitude pairs
-
getLatLngs
List<LatLng> getLatLngs()
Get a list of LatLng for the line, which represents the locations of the line on the map
-
withGeometry
LineOptions withGeometry(LineString geometry)
Set the geometry of the line, which represents the location of the line on the map
- Parameters:
geometry- the location of the line
-
getDraggable
boolean getDraggable()
Returns whether this line is draggable, meaning it can be dragged across the screen when touched and moved.
-
withDraggable
LineOptions withDraggable(boolean draggable)
Set whether this line should be draggable,meaning it can be dragged across the screen when touched and moved.
- Parameters:
draggable- should be draggable
-
withData
LineOptions withData(@Nullable() JsonElement jsonElement)
Set the arbitrary json data of the annotation.
- Parameters:
jsonElement- the arbitrary json element data
-
-
-
-