Class Line
- java.lang.Object
-
- org.maplibre.android.plugins.annotation.Annotation<org.maplibre.geojson.LineString>
-
- org.maplibre.android.plugins.annotation.Line
-
@UiThread public class Line extends Annotation<org.maplibre.geojson.LineString>
-
-
Field Summary
-
Fields inherited from class org.maplibre.android.plugins.annotation.Annotation
geometry, jsonObject
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<org.maplibre.android.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 LineBlur propertyjava.lang.StringgetLineColor()Get the LineColor propertyintgetLineColorAsInt()Get the LineColor propertyjava.lang.FloatgetLineGapWidth()Get the LineGapWidth propertyjava.lang.StringgetLineJoin()Get the LineJoin propertyjava.lang.FloatgetLineOffset()Get the LineOffset propertyjava.lang.FloatgetLineOpacity()Get the LineOpacity propertyjava.lang.StringgetLinePattern()Get the LinePattern propertyjava.lang.FloatgetLineWidth()Get the LineWidth propertyvoidsetLatLngs(java.util.List<org.maplibre.android.geometry.LatLng> latLngs)Set a list of LatLng for the line, which represents the locations of the line on the mapvoidsetLineBlur(java.lang.Float value)Set the LineBlur propertyvoidsetLineColor(int color)Set the LineColor propertyvoidsetLineColor(java.lang.String color)Set the LineColor propertyvoidsetLineGapWidth(java.lang.Float value)Set the LineGapWidth propertyvoidsetLineJoin(java.lang.String value)Set the LineJoin propertyvoidsetLineOffset(java.lang.Float value)Set the LineOffset propertyvoidsetLineOpacity(java.lang.Float value)Set the LineOpacity propertyvoidsetLinePattern(java.lang.String value)Set the LinePattern propertyvoidsetLineWidth(java.lang.Float value)Set the LineWidth property-
Methods inherited from class org.maplibre.android.plugins.annotation.Annotation
equals, getData, getGeometry, getId, hashCode, isDraggable, setData, setDraggable, setGeometry, toString
-
-
-
-
Method Detail
-
setLatLngs
public void setLatLngs(java.util.List<org.maplibre.android.geometry.LatLng> latLngs)
Set a list of LatLng for the line, which represents the locations of the line on the mapTo update the line on the map use
AnnotationManager.update(Annotation).- Parameters:
latLngs- a list of the locations of the line in a longitude and latitude pairs
-
getLatLngs
@NonNull public java.util.List<org.maplibre.android.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 latitude and longitude pairs
-
getLineJoin
public java.lang.String getLineJoin()
Get the LineJoin propertyThe display of lines when joining.
- Returns:
- property wrapper value around String
-
setLineJoin
public void setLineJoin(java.lang.String value)
Set the LineJoin propertyThe display of lines when joining.
To update the line on the map use
AnnotationManager.update(Annotation).- Parameters:
value- constant property value for String
-
getLineOpacity
public java.lang.Float getLineOpacity()
Get the LineOpacity propertyThe opacity at which the line will be drawn.
- Returns:
- property wrapper value around Float
-
setLineOpacity
public void setLineOpacity(java.lang.Float value)
Set the LineOpacity propertyThe opacity at which the line will be drawn.
To update the line on the map use
AnnotationManager.update(Annotation).- Parameters:
value- constant property value for Float
-
getLineColorAsInt
@ColorInt public int getLineColorAsInt()
Get the LineColor propertyThe color with which the line will be drawn.
- Returns:
- color value for String
-
getLineColor
public java.lang.String getLineColor()
Get the LineColor propertyThe color with which the line will be drawn.
- Returns:
- color value for String
-
setLineColor
public void setLineColor(@ColorInt int color)Set the LineColor propertyThe color with which the line will be drawn.
To update the line on the map use
AnnotationManager.update(Annotation).- Parameters:
color- value for String
-
setLineColor
public void setLineColor(@NonNull java.lang.String color)Set the LineColor propertyThe color with which the line will be drawn.
To update the line on the map use
AnnotationManager.update(Annotation).- Parameters:
color- value for String
-
getLineWidth
public java.lang.Float getLineWidth()
Get the LineWidth propertyStroke thickness.
- Returns:
- property wrapper value around Float
-
setLineWidth
public void setLineWidth(java.lang.Float value)
Set the LineWidth propertyStroke thickness.
To update the line on the map use
AnnotationManager.update(Annotation).- Parameters:
value- constant property value for Float
-
getLineGapWidth
public java.lang.Float getLineGapWidth()
Get the LineGapWidth propertyDraws a line casing outside of a line's actual path. Value indicates the width of the inner gap.
- Returns:
- property wrapper value around Float
-
setLineGapWidth
public void setLineGapWidth(java.lang.Float value)
Set the LineGapWidth propertyDraws a line casing outside of a line's actual path. Value indicates the width of the inner gap.
To update the line on the map use
AnnotationManager.update(Annotation).- Parameters:
value- constant property value for Float
-
getLineOffset
public java.lang.Float getLineOffset()
Get the LineOffset propertyThe 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:
- property wrapper value around Float
-
setLineOffset
public void setLineOffset(java.lang.Float value)
Set the LineOffset propertyThe 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.
To update the line on the map use
AnnotationManager.update(Annotation).- Parameters:
value- constant property value for Float
-
getLineBlur
public java.lang.Float getLineBlur()
Get the LineBlur propertyBlur applied to the line, in density-independent pixels.
- Returns:
- property wrapper value around Float
-
setLineBlur
public void setLineBlur(java.lang.Float value)
Set the LineBlur propertyBlur applied to the line, in density-independent pixels.
To update the line on the map use
AnnotationManager.update(Annotation).- Parameters:
value- constant property value for Float
-
getLinePattern
public java.lang.String getLinePattern()
Get the LinePattern propertyName 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:
- property wrapper value around String
-
setLinePattern
public void setLinePattern(java.lang.String value)
Set the LinePattern propertyName 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.
To update the line on the map use
AnnotationManager.update(Annotation).- Parameters:
value- constant property value for String
-
-