Class Fill
- java.lang.Object
-
- org.maplibre.android.plugins.annotation.Annotation<org.maplibre.geojson.Polygon>
-
- org.maplibre.android.plugins.annotation.Fill
-
@UiThread public class Fill extends Annotation<org.maplibre.geojson.Polygon>
-
-
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.lang.StringgetFillColor()Get the FillColor propertyintgetFillColorAsInt()Get the FillColor propertyjava.lang.FloatgetFillOpacity()Get the FillOpacity propertyjava.lang.StringgetFillOutlineColor()Get the FillOutlineColor propertyintgetFillOutlineColorAsInt()Get the FillOutlineColor propertyjava.lang.StringgetFillPattern()Get the FillPattern propertyjava.util.List<java.util.List<org.maplibre.android.geometry.LatLng>>getLatLngs()Get a list of lists of LatLng for the fill, which represents the locations of the fill on the mapvoidsetFillColor(int color)Set the FillColor propertyvoidsetFillColor(java.lang.String color)Set the FillColor propertyvoidsetFillOpacity(java.lang.Float value)Set the FillOpacity propertyvoidsetFillOutlineColor(int color)Set the FillOutlineColor propertyvoidsetFillOutlineColor(java.lang.String color)Set the FillOutlineColor propertyvoidsetFillPattern(java.lang.String value)Set the FillPattern propertyvoidsetLatLngs(java.util.List<java.util.List<org.maplibre.android.geometry.LatLng>> latLngs)Set a list of lists of LatLng for the fill, which represents the locations of the fill on the map-
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<java.util.List<org.maplibre.android.geometry.LatLng>> latLngs)
Set a list of lists of LatLng for the fill, which represents the locations of the fill on the mapTo update the fill on the map use
AnnotationManager.update(Annotation).- Parameters:
latLngs- a list of a lists of the locations of the polygon in a latitude and longitude pairs
-
getLatLngs
@NonNull public java.util.List<java.util.List<org.maplibre.android.geometry.LatLng>> getLatLngs()
Get a list of lists of LatLng for the fill, which represents the locations of the fill on the map- Returns:
- a list of a lists of the locations of the polygon in a latitude and longitude pairs
-
getFillOpacity
public java.lang.Float getFillOpacity()
Get the FillOpacity propertyThe opacity of the entire fill layer. In contrast to the
PropertyFactory.fillColor(int), this value will also affect the 1px stroke around the fill, if the stroke is used.- Returns:
- property wrapper value around Float
-
setFillOpacity
public void setFillOpacity(java.lang.Float value)
Set the FillOpacity propertyThe opacity of the entire fill layer. In contrast to the
PropertyFactory.fillColor(int), this value will also affect the 1px stroke around the fill, if the stroke is used.To update the fill on the map use
AnnotationManager.update(Annotation).- Parameters:
value- constant property value for Float
-
getFillColorAsInt
@ColorInt public int getFillColorAsInt()
Get the FillColor propertyThe color of the filled part of this layer. This color can be specified as `rgba` with an alpha component and the color's opacity will not affect the opacity of the 1px stroke, if it is used.
- Returns:
- color value for String
-
getFillColor
public java.lang.String getFillColor()
Get the FillColor propertyThe color of the filled part of this layer. This color can be specified as `rgba` with an alpha component and the color's opacity will not affect the opacity of the 1px stroke, if it is used.
- Returns:
- color value for String
-
setFillColor
public void setFillColor(@ColorInt int color)Set the FillColor propertyThe color of the filled part of this layer. This color can be specified as `rgba` with an alpha component and the color's opacity will not affect the opacity of the 1px stroke, if it is used.
To update the fill on the map use
AnnotationManager.update(Annotation).- Parameters:
color- value for String
-
setFillColor
public void setFillColor(@NonNull java.lang.String color)Set the FillColor propertyThe color of the filled part of this layer. This color can be specified as `rgba` with an alpha component and the color's opacity will not affect the opacity of the 1px stroke, if it is used.
To update the fill on the map use
AnnotationManager.update(Annotation).- Parameters:
color- value for String
-
getFillOutlineColorAsInt
@ColorInt public int getFillOutlineColorAsInt()
Get the FillOutlineColor propertyThe outline color of the fill. Matches the value of
PropertyFactory.fillColor(int)if unspecified.- Returns:
- color value for String
-
getFillOutlineColor
public java.lang.String getFillOutlineColor()
Get the FillOutlineColor propertyThe outline color of the fill. Matches the value of
PropertyFactory.fillColor(int)if unspecified.- Returns:
- color value for String
-
setFillOutlineColor
public void setFillOutlineColor(@ColorInt int color)Set the FillOutlineColor propertyThe outline color of the fill. Matches the value of
PropertyFactory.fillColor(int)if unspecified.To update the fill on the map use
AnnotationManager.update(Annotation).- Parameters:
color- value for String
-
setFillOutlineColor
public void setFillOutlineColor(@NonNull java.lang.String color)Set the FillOutlineColor propertyThe outline color of the fill. Matches the value of
PropertyFactory.fillColor(int)if unspecified.To update the fill on the map use
AnnotationManager.update(Annotation).- Parameters:
color- value for String
-
getFillPattern
public java.lang.String getFillPattern()
Get the FillPattern propertyName of image in sprite to use for drawing image fills. For seamless patterns, image width and height 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
-
setFillPattern
public void setFillPattern(java.lang.String value)
Set the FillPattern propertyName of image in sprite to use for drawing image fills. For seamless patterns, image width and height 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 fill on the map use
AnnotationManager.update(Annotation).- Parameters:
value- constant property value for String
-
-