public class LineManager extends AnnotationManager<LineLayer,Line,LineOptions,OnLineDragListener,OnLineClickListener,OnLineLongClickListener>
annotations, layer, mapboxMap| Constructor and Description |
|---|
LineManager(MapView mapView,
MapboxMap mapboxMap,
Style style)
Create a line manager, used to manage lines.
|
LineManager(MapView mapView,
MapboxMap mapboxMap,
Style style,
java.lang.String belowLayerId)
Create a line manager, used to manage lines.
|
LineManager(MapView mapView,
MapboxMap mapboxMap,
Style style,
java.lang.String belowLayerId,
GeoJsonOptions geoJsonOptions)
Create a line manager, used to manage lines.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.List<Line> |
create(FeatureCollection featureCollection)
Create a list of lines on the map.
|
java.util.List<Line> |
create(java.lang.String json)
Create a list of lines on the map.
|
Expression |
getFilter()
Get filter of the managed lines.
|
java.lang.String |
getLineCap()
Get the LineCap property
|
java.lang.Float[] |
getLineDasharray()
Get the LineDasharray property
|
java.lang.Float |
getLineMiterLimit()
Get the LineMiterLimit property
|
java.lang.Float |
getLineRoundLimit()
Get the LineRoundLimit property
|
java.lang.Float[] |
getLineTranslate()
Get the LineTranslate property
|
java.lang.String |
getLineTranslateAnchor()
Get the LineTranslateAnchor property
|
protected void |
setDataDrivenPropertyIsUsed(java.lang.String property) |
void |
setFilter(Expression expression)
Set filter on the managed lines.
|
void |
setLineCap(java.lang.String value)
Set the LineCap property
|
void |
setLineDasharray(java.lang.Float[] value)
Set the LineDasharray property
|
void |
setLineMiterLimit(java.lang.Float value)
Set the LineMiterLimit property
|
void |
setLineRoundLimit(java.lang.Float value)
Set the LineRoundLimit property
|
void |
setLineTranslate(java.lang.Float[] value)
Set the LineTranslate property
|
void |
setLineTranslateAnchor(java.lang.String value)
Set the LineTranslateAnchor property
|
addClickListener, addDragListener, addLongClickListener, delete, delete, deleteAll, getAnnotations, getLayerId, onDestroy, removeClickListener, removeDragListener, removeLongClickListener, update, update, updateSourcepublic LineManager(MapView mapView,
MapboxMap mapboxMap,
Style style)
mapboxMap - the map object to add lines tostyle - a valid a fully loaded style objectpublic LineManager(MapView mapView,
MapboxMap mapboxMap,
Style style,
java.lang.String belowLayerId)
mapboxMap - the map object to add lines tostyle - a valid a fully loaded style objectbelowLayerId - the id of the layer above the circle layerpublic LineManager(MapView mapView,
MapboxMap mapboxMap,
Style style,
java.lang.String belowLayerId,
GeoJsonOptions geoJsonOptions)
mapboxMap - the map object to add lines tostyle - a valid a fully loaded style objectbelowLayerId - the id of the layer above the circle layergeoJsonOptions - options for the internal sourceprotected void setDataDrivenPropertyIsUsed(java.lang.String property)
setDataDrivenPropertyIsUsed in class AnnotationManager<LineLayer,Line,LineOptions,OnLineDragListener,OnLineClickListener,OnLineLongClickListener>public java.util.List<Line> create(java.lang.String json)
Lines are going to be created only for features with a matching geometry.
All supported properties are:
LineOptions.PROPERTY_LINE_JOIN - String
LineOptions.PROPERTY_LINE_OPACITY - Float
LineOptions.PROPERTY_LINE_COLOR - String
LineOptions.PROPERTY_LINE_WIDTH - Float
LineOptions.PROPERTY_LINE_GAP_WIDTH - Float
LineOptions.PROPERTY_LINE_OFFSET - Float
LineOptions.PROPERTY_LINE_BLUR - Float
LineOptions.PROPERTY_LINE_PATTERN - String
Learn more about above properties in the Style specification.
Out of spec properties:
"is-draggable" - Boolean, true if the line should be draggable, false otherwise
json - the GeoJSON defining the list of lines to buildpublic java.util.List<Line> create(FeatureCollection featureCollection)
Lines are going to be created only for features with a matching geometry.
All supported properties are:
LineOptions.PROPERTY_LINE_JOIN - String
LineOptions.PROPERTY_LINE_OPACITY - Float
LineOptions.PROPERTY_LINE_COLOR - String
LineOptions.PROPERTY_LINE_WIDTH - Float
LineOptions.PROPERTY_LINE_GAP_WIDTH - Float
LineOptions.PROPERTY_LINE_OFFSET - Float
LineOptions.PROPERTY_LINE_BLUR - Float
LineOptions.PROPERTY_LINE_PATTERN - String
Learn more about above properties in the Style specification.
Out of spec properties:
"is-draggable" - Boolean, true if the line should be draggable, false otherwise
create in class AnnotationManager<LineLayer,Line,LineOptions,OnLineDragListener,OnLineClickListener,OnLineLongClickListener>featureCollection - the featureCollection defining the list of lines to buildpublic java.lang.String getLineCap()
The display of line endings.
public void setLineCap(java.lang.String value)
The display of line endings.
value - property wrapper value around Stringpublic java.lang.Float getLineMiterLimit()
Used to automatically convert miter joins to bevel joins for sharp angles.
public void setLineMiterLimit(java.lang.Float value)
Used to automatically convert miter joins to bevel joins for sharp angles.
value - property wrapper value around Floatpublic java.lang.Float getLineRoundLimit()
Used to automatically convert round joins to miter joins for shallow angles.
public void setLineRoundLimit(java.lang.Float value)
Used to automatically convert round joins to miter joins for shallow angles.
value - property wrapper value around Floatpublic java.lang.Float[] getLineTranslate()
The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.
public void setLineTranslate(java.lang.Float[] value)
The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.
value - property wrapper value around Float[]public java.lang.String getLineTranslateAnchor()
Controls the frame of reference for PropertyFactory#lineTranslate.
public void setLineTranslateAnchor(java.lang.String value)
Controls the frame of reference for PropertyFactory#lineTranslate.
value - property wrapper value around Stringpublic java.lang.Float[] getLineDasharray()
Specifies the lengths of the alternating dashes and gaps that form the dash pattern. The lengths are later scaled by the line width. To convert a dash length to density-independent pixels, multiply the length by the current line width. Note that GeoJSON sources with `lineMetrics: true` specified won't render dashed lines to the expected scale. Also note that zoom-dependent expressions will be evaluated only at integer zoom levels.
public void setLineDasharray(java.lang.Float[] value)
Specifies the lengths of the alternating dashes and gaps that form the dash pattern. The lengths are later scaled by the line width. To convert a dash length to density-independent pixels, multiply the length by the current line width. Note that GeoJSON sources with `lineMetrics: true` specified won't render dashed lines to the expected scale. Also note that zoom-dependent expressions will be evaluated only at integer zoom levels.
value - property wrapper value around Float[]public void setFilter(Expression expression)
expression - expressionpublic Expression getFilter()
© 2015–2019 Mapbox. All rights reserved.