Class LineOptions
- java.lang.Object
-
- com.mapbox.mapboxsdk.plugins.annotation.Options<Line>
-
- com.mapbox.mapboxsdk.plugins.annotation.LineOptions
-
-
Constructor Summary
Constructors Constructor Description LineOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.gson.JsonElementgetData()Get the arbitrary json data of the annotation.booleangetDraggable()Returns whether this line is draggable, meaning it can be dragged across the screen when touched and moved.com.mapbox.geojson.LineStringgetGeometry()Get the geometry of the line, which represents the location of the line on the mapjava.util.List<com.mapbox.mapboxsdk.geometry.LatLng>getLatLngs()Get a list of LatLng for the line, which represents the locations of the line on the mapjava.lang.FloatgetLineBlur()Get the current configured line-blur for the linejava.lang.StringgetLineColor()Get the current configured line-color for the linejava.lang.FloatgetLineGapWidth()Get the current configured line-gap-width for the linejava.lang.StringgetLineJoin()Get the current configured line-join for the linejava.lang.FloatgetLineOffset()Get the current configured line-offset for the linejava.lang.FloatgetLineOpacity()Get the current configured line-opacity for the linejava.lang.StringgetLinePattern()Get the current configured line-pattern for the linejava.lang.FloatgetLineWidth()Get the current configured line-width for the lineLineOptionswithData(com.google.gson.JsonElement jsonElement)Set the arbitrary json data of the annotation.LineOptionswithDraggable(boolean draggable)Set whether this line should be draggable, meaning it can be dragged across the screen when touched and moved.LineOptionswithGeometry(com.mapbox.geojson.LineString geometry)Set the geometry of the line, which represents the location of the line on the mapLineOptionswithLatLngs(java.util.List<com.mapbox.mapboxsdk.geometry.LatLng> latLngs)Set a list of LatLng for the line, which represents the locations of the line on the mapLineOptionswithLineBlur(java.lang.Float lineBlur)Set line-blur to initialise the line with.LineOptionswithLineColor(java.lang.String lineColor)Set line-color to initialise the line with.LineOptionswithLineGapWidth(java.lang.Float lineGapWidth)Set line-gap-width to initialise the line with.LineOptionswithLineJoin(java.lang.String lineJoin)Set line-join to initialise the line with.LineOptionswithLineOffset(java.lang.Float lineOffset)Set line-offset to initialise the line with.LineOptionswithLineOpacity(java.lang.Float lineOpacity)Set line-opacity to initialise the line with.LineOptionswithLinePattern(java.lang.String linePattern)Set line-pattern to initialise the line with.LineOptionswithLineWidth(java.lang.Float lineWidth)Set line-width to initialise the line with.
-
-
-
Method Detail
-
withLineJoin
public LineOptions withLineJoin(java.lang.String lineJoin)
Set line-join to initialise the line with.The display of lines when joining.
- Parameters:
lineJoin- the line-join value- Returns:
- this
-
getLineJoin
public java.lang.String getLineJoin()
Get the current configured line-join for the lineThe display of lines when joining.
- Returns:
- lineJoin value
-
withLineOpacity
public LineOptions withLineOpacity(java.lang.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- Returns:
- this
-
getLineOpacity
public java.lang.Float getLineOpacity()
Get the current configured line-opacity for the lineThe opacity at which the line will be drawn.
- Returns:
- lineOpacity value
-
withLineColor
public LineOptions withLineColor(java.lang.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- Returns:
- this
-
getLineColor
public java.lang.String getLineColor()
Get the current configured line-color for the lineThe color with which the line will be drawn.
- Returns:
- lineColor value
-
withLineWidth
public LineOptions withLineWidth(java.lang.Float lineWidth)
Set line-width to initialise the line with.Stroke thickness.
- Parameters:
lineWidth- the line-width value- Returns:
- this
-
getLineWidth
public java.lang.Float getLineWidth()
Get the current configured line-width for the lineStroke thickness.
- Returns:
- lineWidth value
-
withLineGapWidth
public LineOptions withLineGapWidth(java.lang.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- Returns:
- this
-
getLineGapWidth
public java.lang.Float getLineGapWidth()
Get the current configured line-gap-width for the lineDraws a line casing outside of a line's actual path. Value indicates the width of the inner gap.
- Returns:
- lineGapWidth value
-
withLineOffset
public LineOptions withLineOffset(java.lang.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- Returns:
- this
-
getLineOffset
public java.lang.Float getLineOffset()
Get the current configured line-offset for the lineThe 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.
- Returns:
- lineOffset value
-
withLineBlur
public LineOptions withLineBlur(java.lang.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- Returns:
- this
-
getLineBlur
public java.lang.Float getLineBlur()
Get the current configured line-blur for the lineBlur applied to the line, in density-independent pixels.
- Returns:
- lineBlur value
-
withLinePattern
public LineOptions withLinePattern(java.lang.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- Returns:
- this
-
getLinePattern
public java.lang.String getLinePattern()
Get the current configured line-pattern for the lineName 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.
- Returns:
- linePattern value
-
withLatLngs
public LineOptions withLatLngs(java.util.List<com.mapbox.mapboxsdk.geometry.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- Returns:
- this
-
getLatLngs
public java.util.List<com.mapbox.mapboxsdk.geometry.LatLng> getLatLngs()
Get a list of LatLng for the line, which represents the locations of the line on the map- Returns:
- a list of the locations of the line in a longitude and latitude pairs
-
withGeometry
public LineOptions withGeometry(com.mapbox.geojson.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- Returns:
- this
-
getGeometry
public com.mapbox.geojson.LineString getGeometry()
Get the geometry of the line, which represents the location of the line on the map- Returns:
- the location of the line
-
getDraggable
public boolean getDraggable()
Returns whether this line is draggable, meaning it can be dragged across the screen when touched and moved.- Returns:
- draggable when touched
-
withDraggable
public 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
public LineOptions withData(@Nullable com.google.gson.JsonElement jsonElement)
Set the arbitrary json data of the annotation.- Parameters:
jsonElement- the arbitrary json element data
-
getData
@Nullable public com.google.gson.JsonElement getData()
Get the arbitrary json data of the annotation.- Returns:
- the arbitrary json object data if set, else null
-
-