LuciadCPillar C# 2024.0.04
Luciad.Layers.MbTiles.MbTilesFeatureLayer.Builder Class Reference

Builder for the MbTilesFeatureLayer class. More...

Inheritance diagram for Luciad.Layers.MbTiles.MbTilesFeatureLayer.Builder:

Public Member Functions

 Builder (Luciad.Layers.MbTiles.MbTilesFeatureLayer.Builder other)
 
Luciad.Layers.MbTiles.MbTilesFeatureLayer Build ()
 Returns a new layer, based on the properties set on this builder. More...
 
void Dispose ()
 
Luciad.Layers.MbTiles.MbTilesFeatureLayer.Builder Labeled (bool labeled)
 Sets whether the layer should display labels initially. More...
 
Luciad.Layers.MbTiles.MbTilesFeatureLayer.Builder Model (Luciad.Models.FeatureTiles.IFeatureTileModel model)
 Sets the feature tile model of the layer. More...
 
Luciad.Layers.MbTiles.MbTilesFeatureLayer.Builder Style (string path)
 Sets the style of the layer. More...
 
Luciad.Layers.MbTiles.MbTilesFeatureLayer.Builder Title (string title)
 Sets the title to use for the layer. More...
 
Luciad.Layers.MbTiles.MbTilesFeatureLayer.Builder Visible (bool visible)
 Sets whether the layer should be visible initially. More...
 

Detailed Description

Builder for the MbTilesFeatureLayer class.

Since
2024.0

Constructor & Destructor Documentation

◆ Builder()

Luciad.Layers.MbTiles.MbTilesFeatureLayer.Builder.Builder ( Luciad.Layers.MbTiles.MbTilesFeatureLayer.Builder  other)
inline

Member Function Documentation

◆ Build()

Luciad.Layers.MbTiles.MbTilesFeatureLayer Luciad.Layers.MbTiles.MbTilesFeatureLayer.Builder.Build ( )
inline

Returns a new layer, based on the properties set on this builder.

Returns
a new layer, based on the properties set on this builder.
Exceptions
System.InvalidOperationExceptionIf not all mandatory parameters are set.
System.IO.IOExceptionIf decoding the style fails.

◆ Dispose()

void Luciad.Layers.MbTiles.MbTilesFeatureLayer.Builder.Dispose ( )
inline

◆ Labeled()

Luciad.Layers.MbTiles.MbTilesFeatureLayer.Builder Luciad.Layers.MbTiles.MbTilesFeatureLayer.Builder.Labeled ( bool  labeled)
inline

Sets whether the layer should display labels initially.

The default is true.

Parameters
labeledwhether the layer should display labels initially.
Returns
this builder.
See also
MbTilesFeatureLayer.setLabeled

◆ Model()

Luciad.Layers.MbTiles.MbTilesFeatureLayer.Builder Luciad.Layers.MbTiles.MbTilesFeatureLayer.Builder.Model ( Luciad.Models.FeatureTiles.IFeatureTileModel  model)
inline

Sets the feature tile model of the layer.

Calling this function is mandatory.

Parameters
modelthe feature tile model of the layer. Cannot be null.
Returns
this builder.
Exceptions
System.ArgumentNullExceptionwhen the given model is null.

◆ Style()

Luciad.Layers.MbTiles.MbTilesFeatureLayer.Builder Luciad.Layers.MbTiles.MbTilesFeatureLayer.Builder.Style ( string  path)
inline

Sets the style of the layer.

If not set, a default style is used instead.

The currently supported format is the Mapbox style format (see the Mapbox style specification). Only the sections that are relevant for styling MBTiles are supported, namely:

  • Layers
  • Types
  • Expressions
  • Sprite

When the Mapbox style contains a background layer style, it is applied on the extent of the feature tile data set. Use of interpolation based on zoom level is not supported for the background. The background at zoom level 0 is used.

Note that not all types, expressions and style properties defined by the Mapbox style format are supported. When an unsupported option is used in the style, that option is ignored and if appropriate, a fallback value is used instead.

The following is currently supported:

Types

  • array<number>
  • array<string>
  • boolean
  • color: strings of the following format are supported: "#RRGGBB", "#RGB", "#RRGGBBAA", "#RGBA", "rgb(r, g, b)", "rgba(r, g, b, a)", "hsl(h, s%, l%)", "hsla(h, s%, l%, a)")
  • formatted: format expressions are converted to strings and their formatting options are stripped and ignored
  • number
  • string

Expressions

  • Types: array (lengths are not asserted), boolean, format (converted to string and the formatting options are stripped and ignored), literal, number, string, to-boolean, to-color (if a string or array<number> cannot be converted, transparent black is returned), to-number (if a string cannot be converted, 0 is returned), to-string, typeof
  • Feature data: geometry-type, id
  • Lookup: at (if index invalid, 0/"" is returned for array<number>/array<string> respectively), get (only for feature properties, not objects), has (only for feature properties, not objects), in, index-of, length, slice
  • Ramps, scales, curves: interpolate (interpolate-hcl and interpolate-lab interpolate in RGB colorspace as well), step
  • Decision: !, !=, <, <=, ==, >, >=, all, any, case, coalesce, match
  • String: concat, downcase, is-supported-script (always returns true), resolved-locale (always returns "en"), upcase
  • Color: hsl, hsla, rgb, rgba, to-rgba
  • Math: -, *, /, %, ^, +, abs, acos, asin, atan, ceil, cos, e, floor, ln, ln2, log10, log2, max, min, pi, random, round, sin, sqrt, tan
  • Camera: zoom
  • Legacy: stops, property, base, type, default, existential filters, comparison filters, set membership filters, combining filters

Layers

  • All layers:
    • id
    • type
    • filter
    • layout
    • maxzoom
    • minzoom
    • paint
    • source-layer
  • Background layers:
    • background-color
    • background-opacity
    • background-pattern
    • visibility
  • Fill layers:
    • fill-color
    • fill-opacity
    • fill-outline-color
    • fill-pattern
    • fill-translate
    • visibility
  • Line layers:
    • line-color
    • line-dasharray
    • line-offset
    • line-opacity
    • line-pattern
    • visibility
  • Symbol layers:
    • icon-allow-overlap: also allows other symbols to be drawn on top (i.e. the behavior of icon-ignore-placement)
    • icon-anchor
    • icon-color
    • icon-image
    • icon-keep-upright
    • icon-offset
    • icon-opacity
    • icon-optional
    • icon-padding
    • icon-rotate
    • icon-rotation-alignment
    • icon-size
    • icon-text-fit
    • icon-text-fit-padding
    • icon-translate
    • symbol-placement
    • text-allow-overlap: also allows other symbols to be drawn on top (i.e. the behavior of text-ignore-placement)
    • text-anchor
    • text-color
    • text-field
    • text-font: defaults to Noto
    • text-halo-color
    • text-halo-width
    • text-justify: "auto" in conjunction with a variable anchor will result in centered text
    • text-keep-upright
    • text-line-height
    • text-offset
    • text-opacity
    • text-optional
    • text-padding
    • text-radial-offset
    • text-rotate
    • text-rotation-alignment
    • text-size
    • text-transform
    • text-translate
    • text-variable-anchor
    • visibility
  • Circle layers:
    • circle-color
    • circle-opacity
    • circle-radius
    • circle-stroke-color
    • circle-stroke-opacity
    • circle-stroke-width
    • circle-translate
    • visibility
  • Fill extrusion layers:
    • fill-extrusion-base
    • fill-extrusion-color
    • fill-extrusion-height
    • fill-extrusion-opacity
    • fill-extrusion-pattern
    • fill-extrusion-translate
    • fill-extrusion-vertical-scale
    • visibility
Parameters
paththe path to a style file. Can be a URL or a file path to a JSON file.
Returns
this builder.

◆ Title()

Luciad.Layers.MbTiles.MbTilesFeatureLayer.Builder Luciad.Layers.MbTiles.MbTilesFeatureLayer.Builder.Title ( string  title)
inline

Sets the title to use for the layer.

If not set, the title from the ModelMetadata is used.

Parameters
titlethe title for the layer.
Returns
this builder.

◆ Visible()

Luciad.Layers.MbTiles.MbTilesFeatureLayer.Builder Luciad.Layers.MbTiles.MbTilesFeatureLayer.Builder.Visible ( bool  visible)
inline

Sets whether the layer should be visible initially.

Default is true.

Parameters
visiblethe visibility.
Returns
this builder.