Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Type aliases

AnyJson: boolean | number | string | null | JsonArray | JsonMap
DeepPartial<T>: { [ P in keyof T]?: T[P] extends infer U[] ? DeepPartial<U>[] : T[P] extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : DeepPartial<T[P]> }

Same as Partial but goes deeper and makes Partial all its properties and sub-properties.

Type parameters

  • T

FeatureProperties: {}

Type declaration

  • [name: string]: any
JsonArray: AnyJson[]
LngLatArray: Position | number[]

Array of two numbers representing longitude and latitude.

LngLatBoundsArray: [number, number, number, number] | number[]

Array of coordinates, measured in degrees, in [west, south, east, north] order. GeoJSON standard

Position: [number, number]

A Position is an array of coordinates. GeoJSON standard Array should contain between two and three elements. The previous GeoJSON specification allowed more elements (e.g., which could be used to represent M values), but the current specification only allows X, Y, and (optionally) Z to be defined.

Type<T>: new (...args: any[]) => T

Type parameters

  • T

Type declaration

    • new (...args: any[]): T
    • Parameters

      • Rest ...args: any[]

      Returns T

ZoomLevel: number

Map zoom level. From 0 to 22

Variables

EARTHS_RADIUS: 6371 = 6371

Radius of the earth in kilometers

isBrowser: boolean = ...
type: "browser" | "node" = ...

Functions

  • DebounceDecorator(wait?: number): (target: unknown, key: string, descriptor: PropertyDescriptor) => PropertyDescriptor
  • Parameters

    • wait: number = 10

    Returns (target: unknown, key: string, descriptor: PropertyDescriptor) => PropertyDescriptor

      • (target: unknown, key: string, descriptor: PropertyDescriptor): PropertyDescriptor
      • Parameters

        • target: unknown
        • key: string
        • descriptor: PropertyDescriptor

        Returns PropertyDescriptor

  • allProperties(obj: Record<string, unknown>): string[]
  • arrayChunk<T>(arr: T[], size: number): T[][]
  • arrayCompare(array1: any[], array2: any[]): boolean
  • Comparison of the contents of two arrays. Position of elements is ignored.

    example
    arrayCompare(['a', 'b'], ['b', 'a']) // true
    arrayCompare(['a', 'b'], ['b']) // false
    arrayCompare('asdf1234', '1234asdf') // true

    Parameters

    • array1: any[]
    • array2: any[]

    Returns boolean

  • arrayCompareStrict(array1: any[], array2: any[]): boolean
  • Comparing content and position of elements of two arrays.

    example
    arrayCompareStrict(['a', 'b'], ['a', 'b']) // true
    arrayCompareStrict(['a', 'b'], ['b', 'a']) // false
    arrayCompareStrict('asdf1234', 'asdf1234') // true
    arrayCompareStrict('asdf1234', '1234asdf') // false

    Parameters

    • array1: any[]
    • array2: any[]

    Returns boolean

  • arrayUnique<T>(arr: T[]): T[]
  • camelize(text: string, separator?: RegExp): string
  • Camelize a string, cutting the string by separator character.

    Parameters

    • text: string

      to camelize

    • separator: RegExp = ...

      Word separator (string or regexp)

    Returns string

    string Camelized text

  • capitalize(str: string): string
  • coordinatesCount(geojson: GeoJSON): number
  • debounce<T>(cb: T, wait?: number): T & { clear: any }
  • debugLog(message?: string): boolean
  • deepmerge<T>(x: Partial<T>, y: Partial<T>, mergeArray?: boolean): T
  • defined<T>(val: T): val is Exclude<T, undefined | null>
  • degrees2Radian(deg: number): number
  • degrees2meters(lng: number, lat: number): [number, number]
  • deprecatedMapClick<T>(ev: T): T
  • deprecatedWarn(message: string): void
  • eachCoordinates(geojson: GeoJSON, cb: (position: Position) => void): void
  • eachGeometry(geojson: GeoJSON, cb: (position: Geometry) => void): void
  • fixUrlStr(url: string): string
  • flatten(data: Record<string, any>, opt?: FlattenOptions): Record<string, any>
  • full<T>(val: T): val is Exclude<T, undefined | null>
  • getCircleFeature(lng: number, lat: number, radius?: number, points?: number): Feature<Polygon>
  • getCirclePolygonCoordinates(lng: number, lat: number, radius?: number, points?: number): Position[]
  • getCoordinates(geojson: GeoJSON): Position[]
  • getGlobalVariable(): any
  • getIdentifyRadius(center: LngLatArray, zoom: number, pixelRadius: number): number
  • getPolygons(geojson: GeoJSON): Position[][]
  • isAnyJson(val: unknown): val is AnyJson
  • isArray(val: unknown): val is []
  • isJsonMap(val: unknown): val is JsonMap
  • isObjKey<O>(obj: O, key: unknown): key is keyof O
  • isObject(val: unknown): val is Record<string | number, any>
  • keyInObj<O>(obj: O, key: unknown): key is keyof O
  • mixinProperties(derivedCtor: any, baseCtor: any, properties: string[]): void
  • numberWithSpaces(x: number): string
  • objectAssign<T, U>(target: T, source: U): T & U
  • objectAssign<T, U, V>(target: T, source1: U, source2: V): T & U & V
  • objectAssign<T, U, V, W>(target: T, source1: U, source2: V, source3: W): T & U & V & W
  • Copy the values of all of the enumerable own properties from one or more source objects to a target object. Returns the target object.

    Type parameters

    • T

    • U

    Parameters

    • target: T

      The target object to copy to.

    • source: U

    Returns T & U

  • Copy the values of all of the enumerable own properties from one or more source objects to a target object. Returns the target object.

    Type parameters

    • T

    • U

    • V

    Parameters

    • target: T

      The target object to copy to.

    • source1: U

      The first source object from which to copy properties.

    • source2: V

      The second source object from which to copy properties.

    Returns T & U & V

  • Copy the values of all of the enumerable own properties from one or more source objects to a target object. Returns the target object.

    Type parameters

    • T

    • U

    • V

    • W

    Parameters

    • target: T

      The target object to copy to.

    • source1: U

      The first source object from which to copy properties.

    • source2: V

      The second source object from which to copy properties.

    • source3: W

      The third source object from which to copy properties.

    Returns T & U & V & W

  • objectDeepEqual<T>(o: T, p: T): boolean
  • objectRemoveEmpty<T>(obj: T): T
  • reEscape(s: string): string
  • round(val: number, toFixed?: number): number
  • sleep(delay?: number): Promise<void>
  • unflatten(data: any[] | Record<string, any>): Record<string, any>

Generated using TypeDoc