Options
All
  • Public
  • Public/Protected
  • All
Menu

A feature has a geometry, an id, and a set of properties.

Hierarchy

  • Feature

Index

Constructors

constructor

  • A feature has a geometry, an id, and a set of properties.

    Parameters

    Returns Feature

Methods

forEachProperty

  • forEachProperty(callback: (a: any, b: string) => void): void
  • Repeatedly invokes the given function, passing a property value and name on each invocation. The order of iteration through the properties is undefined.

    Parameters

    • callback: (a: any, b: string) => void
        • (a: any, b: string): void
        • Parameters

          • a: any
          • b: string

          Returns void

    Returns void

getGeometry

  • Returns the feature's geometry.

    Returns null | Geometry

getId

  • getId(): undefined | string | number
  • Returns the feature ID.

    Returns undefined | string | number

getProperty

  • getProperty(name: string): any
  • Returns the value of the requested property, or undefined if the property does not exist.

    Parameters

    • name: string

    Returns any

removeProperty

  • removeProperty(name: string): void
  • Removes the property with the given name.

    Parameters

    • name: string

    Returns void

setGeometry

setProperty

  • setProperty(name: string, newValue: any): void
  • Sets the value of the specified property. If newValue is undefined this is equivalent to calling removeProperty.

    Parameters

    • name: string
    • newValue: any

    Returns void

toGeoJson

  • toGeoJson(callback: (a: object) => void): void
  • Exports the feature to a GeoJSON object.

    Parameters

    • callback: (a: object) => void
        • (a: object): void
        • Parameters

          • a: object

          Returns void

    Returns void

Generated using TypeDoc