Class LineManager

java.lang.Object
com.trimblemaps.mapsdk.plugins.annotation.AnnotationManager<com.trimblemaps.mapsdk.style.layers.LineLayer,Line,LineOptions,OnLineDragListener,OnLineClickListener,OnLineLongClickListener>
com.trimblemaps.mapsdk.plugins.annotation.LineManager

public class LineManager extends AnnotationManager<com.trimblemaps.mapsdk.style.layers.LineLayer,Line,LineOptions,OnLineDragListener,OnLineClickListener,OnLineLongClickListener>
The line manager allows to add lines to a map.
  • 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 to
      style - 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 to
      style - a valid a fully loaded style object
      belowLayerId - 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 to
      style - a valid a fully loaded style object
      belowLayerId - the id of the layer above the circle layer
      geoJsonOptions - options for the internal source
  • Method Details

    • setDataDrivenPropertyIsUsed

      protected void setDataDrivenPropertyIsUsed(@NonNull String property)
      Specified by:
      setDataDrivenPropertyIsUsed in class AnnotationManager<com.trimblemaps.mapsdk.style.layers.LineLayer,Line,LineOptions,OnLineDragListener,OnLineClickListener,OnLineLongClickListener>
    • create

      @UiThread public List<Line> create(@NonNull String json)
      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

      public String getLineCap()
      Get the LineCap property

      The display of line endings.

      Returns:
      property wrapper value around String
    • setLineCap

      public void setLineCap(String value)
      Set the LineCap property

      The display of line endings.

      Parameters:
      value - property wrapper value around String
    • getLineMiterLimit

      public Float getLineMiterLimit()
      Get the LineMiterLimit property

      Used to automatically convert miter joins to bevel joins for sharp angles.

      Returns:
      property wrapper value around Float
    • setLineMiterLimit

      public void setLineMiterLimit(Float value)
      Set the LineMiterLimit property

      Used to automatically convert miter joins to bevel joins for sharp angles.

      Parameters:
      value - property wrapper value around Float
    • getLineRoundLimit

      public Float getLineRoundLimit()
      Get the LineRoundLimit property

      Used to automatically convert round joins to miter joins for shallow angles.

      Returns:
      property wrapper value around Float
    • setLineRoundLimit

      public void setLineRoundLimit(Float value)
      Set the LineRoundLimit property

      Used to automatically convert round joins to miter joins for shallow angles.

      Parameters:
      value - property wrapper value around Float
    • getLineTranslate

      public Float[] getLineTranslate()
      Get the LineTranslate property

      The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.

      Returns:
      property wrapper value around Float[]
    • setLineTranslate

      public void setLineTranslate(Float[] value)
      Set the LineTranslate property

      The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.

      Parameters:
      value - property wrapper value around Float[]
    • getLineTranslateAnchor

      public String getLineTranslateAnchor()
      Get the LineTranslateAnchor property

      Controls the frame of reference for PropertyFactory.lineTranslate(java.lang.Float[]).

      Returns:
      property wrapper value around String
    • setLineTranslateAnchor

      public void setLineTranslateAnchor(String value)
      Set the LineTranslateAnchor property

      Controls the frame of reference for PropertyFactory.lineTranslate(java.lang.Float[]).

      Parameters:
      value - property wrapper value around String
    • getLineDasharray

      public Float[] getLineDasharray()
      Get the LineDasharray property

      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.

      Returns:
      property wrapper value around Float[]
    • setLineDasharray

      public void setLineDasharray(Float[] value)
      Set the LineDasharray property

      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.

      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