Class BaseVectorLayer

Base Vector Layer This is an intermediary for storing layer data in the Open Vector Tile format.

Constructors

  • Parameters

    • version: number = 1

      the version of the vector tile. This is a number that tracks the OVT specification. and shouldn't be tampered with

    • name: string = ''

      the name of the layer

    • extent: Extents = 4096

      the extent of the vector tile (only 512, 1_024, 2_048, 4_096, and 8_192 are supported)

    • features: BaseVectorFeature[] = []

      the Base Vector Features stored in the layer.

    • Optionalshape: Shape

      the shape of each feature properies

    • OptionalmShape: Shape

      the shape of each feature's M-Values

    Returns BaseVectorLayer

Properties

extent: Extents = 4096

the extent of the vector tile (only 512, 1_024, 2_048, 4_096, and 8_192 are supported)

features: BaseVectorFeature[] = []

the Base Vector Features stored in the layer.

mShape?: Shape

the shape of each feature's M-Values

name: string = ''

the name of the layer

version: number = 1

the version of the vector tile. This is a number that tracks the OVT specification. and shouldn't be tampered with

Accessors

  • get length(): number
  • Returns number

    The number of features in the layer

Methods

  • Add a new feature to the layer

    Parameters

    Returns void

  • Parameters

    • layer: Layer

      a S2JSON Layer

    • OptionallayerMap: S2JSONLayerGuide

      the layer guide on what extent and shapes to use if user provided

    Returns BaseVectorLayer

    A Base Vector Layer