Class LineManager
-
Field Summary
Fields inherited from class com.trimblemaps.mapsdk.plugins.annotation.AnnotationManager
annotations, layer, trimbleMapsMap -
Constructor Summary
ConstructorsConstructorDescriptionLineManager(com.trimblemaps.mapsdk.maps.MapView mapView, com.trimblemaps.mapsdk.maps.TrimbleMapsMap trimbleMapsMap, com.trimblemaps.mapsdk.maps.Style style) Create a line manager, used to manage lines.LineManager(com.trimblemaps.mapsdk.maps.MapView mapView, com.trimblemaps.mapsdk.maps.TrimbleMapsMap trimbleMapsMap, com.trimblemaps.mapsdk.maps.Style style, String belowLayerId) Create a line manager, used to manage lines.LineManager(com.trimblemaps.mapsdk.maps.MapView mapView, com.trimblemaps.mapsdk.maps.TrimbleMapsMap trimbleMapsMap, com.trimblemaps.mapsdk.maps.Style style, String belowLayerId, com.trimblemaps.mapsdk.style.sources.GeoJsonOptions geoJsonOptions) Create a line manager, used to manage lines. -
Method Summary
Modifier and TypeMethodDescriptioncreate(com.trimblemaps.geojson.FeatureCollection featureCollection) Create a list of lines on the map.Create a list of lines on the map.com.trimblemaps.mapsdk.style.expressions.ExpressionGet filter of the managed lines.Get the LineCap propertyFloat[]Get the LineDasharray propertyGet the LineMiterLimit propertyGet the LineRoundLimit propertyFloat[]Get the LineTranslate propertyGet the LineTranslateAnchor propertyprotected voidsetDataDrivenPropertyIsUsed(String property) voidsetFilter(com.trimblemaps.mapsdk.style.expressions.Expression expression) Set filter on the managed lines.voidsetLineCap(String value) Set the LineCap propertyvoidsetLineDasharray(Float[] value) Set the LineDasharray propertyvoidsetLineMiterLimit(Float value) Set the LineMiterLimit propertyvoidsetLineRoundLimit(Float value) Set the LineRoundLimit propertyvoidsetLineTranslate(Float[] value) Set the LineTranslate propertyvoidsetLineTranslateAnchor(String value) Set the LineTranslateAnchor propertyMethods inherited from class com.trimblemaps.mapsdk.plugins.annotation.AnnotationManager
addClickListener, addDragListener, addLongClickListener, create, create, delete, delete, deleteAll, getAnnotations, getLayerId, onDestroy, removeClickListener, removeDragListener, removeLongClickListener, update, update, updateSource
-
Constructor Details
-
LineManager
@UiThread public LineManager(@NonNull com.trimblemaps.mapsdk.maps.MapView mapView, @NonNull com.trimblemaps.mapsdk.maps.TrimbleMapsMap trimbleMapsMap, @NonNull com.trimblemaps.mapsdk.maps.Style style) Create a line manager, used to manage lines.- Parameters:
trimbleMapsMap- the map object to add lines tostyle- a valid a fully loaded style object
-
LineManager
@UiThread public LineManager(@NonNull com.trimblemaps.mapsdk.maps.MapView mapView, @NonNull com.trimblemaps.mapsdk.maps.TrimbleMapsMap trimbleMapsMap, @NonNull com.trimblemaps.mapsdk.maps.Style style, @Nullable String belowLayerId) Create a line manager, used to manage lines.- Parameters:
trimbleMapsMap- the map object to add lines tostyle- a valid a fully loaded style objectbelowLayerId- the id of the layer above the circle layer
-
LineManager
@UiThread public LineManager(@NonNull com.trimblemaps.mapsdk.maps.MapView mapView, @NonNull com.trimblemaps.mapsdk.maps.TrimbleMapsMap trimbleMapsMap, @NonNull com.trimblemaps.mapsdk.maps.Style style, @Nullable String belowLayerId, @Nullable com.trimblemaps.mapsdk.style.sources.GeoJsonOptions geoJsonOptions) Create a line manager, used to manage lines.- Parameters:
trimbleMapsMap- 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 source
-
-
Method Details
-
setDataDrivenPropertyIsUsed
- Specified by:
setDataDrivenPropertyIsUsedin classAnnotationManager<com.trimblemaps.mapsdk.style.layers.LineLayer,Line, LineOptions, OnLineDragListener, OnLineClickListener, OnLineLongClickListener>
-
create
Create a list of lines on the map.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
Out of spec properties:
"is-draggable" - Boolean, true if the line should be draggable, false otherwise- Parameters:
json- the GeoJSON defining the list of lines to build- Returns:
- the list of built lines
-
create
@UiThread public List<Line> create(@NonNull com.trimblemaps.geojson.FeatureCollection featureCollection) Create a list of lines on the map.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
Out of spec properties:
"is-draggable" - Boolean, true if the line should be draggable, false otherwise- Parameters:
featureCollection- the featureCollection defining the list of lines to build- Returns:
- the list of built lines
-
getLineCap
Get the LineCap propertyThe display of line endings.
- Returns:
- property wrapper value around String
-
setLineCap
Set the LineCap propertyThe display of line endings.
- Parameters:
value- property wrapper value around String
-
getLineMiterLimit
Get the LineMiterLimit propertyUsed to automatically convert miter joins to bevel joins for sharp angles.
- Returns:
- property wrapper value around Float
-
setLineMiterLimit
Set the LineMiterLimit propertyUsed to automatically convert miter joins to bevel joins for sharp angles.
- Parameters:
value- property wrapper value around Float
-
getLineRoundLimit
Get the LineRoundLimit propertyUsed to automatically convert round joins to miter joins for shallow angles.
- Returns:
- property wrapper value around Float
-
setLineRoundLimit
Set the LineRoundLimit propertyUsed to automatically convert round joins to miter joins for shallow angles.
- Parameters:
value- property wrapper value around Float
-
getLineTranslate
Get the LineTranslate propertyThe geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.
- Returns:
- property wrapper value around Float[]
-
setLineTranslate
Set the LineTranslate propertyThe geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.
- Parameters:
value- property wrapper value around Float[]
-
getLineTranslateAnchor
Get the LineTranslateAnchor propertyControls the frame of reference for
PropertyFactory.lineTranslate(java.lang.Float[]).- Returns:
- property wrapper value around String
-
setLineTranslateAnchor
Set the LineTranslateAnchor propertyControls the frame of reference for
PropertyFactory.lineTranslate(java.lang.Float[]).- Parameters:
value- property wrapper value around String
-
getLineDasharray
Get the LineDasharray propertySpecifies 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.
- Returns:
- property wrapper value around Float[]
-
setLineDasharray
Set the LineDasharray propertySpecifies 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.
- Parameters:
value- property wrapper value around Float[]
-
setFilter
public void setFilter(@NonNull com.trimblemaps.mapsdk.style.expressions.Expression expression) Set filter on the managed lines.- Parameters:
expression- expression
-
getFilter
@Nullable public com.trimblemaps.mapsdk.style.expressions.Expression getFilter()Get filter of the managed lines.- Returns:
- expression
-