@nativescript-community/ui-massifmaps
    Preparing search index...

    Class MassifSource<C>

    A native subscription is taken on an event's first handler and dropped with its last.

    Type Parameters

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    className: C
    handle: Handle<C>
    id?: string

    The registry id, when the object has one. A call result does not.

    Accessors

    • get events(): string[]

      Returns string[]

    • get native(): any

      Returns any

    • get valid(): boolean

      False after destroy, and after the id was dropped.

      Returns boolean

    Methods

    • A facade event takes its native subscription here, on the first handler.

      Parameters

      • eventNames: string
      • callback: (data: EventData) => void
      • OptionalthisArg: any
      • ...rest: any[]

      Returns void

    • Avoids re-tiling the whole document as setGeoJSON does. update matches on the feature's own id.

      Parameters

      • layer: number
      • feature: object | Json

      Returns this

    • Several properties in ONE JNI/JSI crossing via setAll. Object values (handles, inline specs) cannot be JSON and go one by one, as does everything on an SDK without setAll.

      Parameters

      Returns this

    • Hook for a subclass that has to install a native listener before the first subscription.

      Parameters

      • event: string

      Returns void

    • The path may traverse object properties (layer.call('tileDecoder.setStyleParameter', ...)). An object result is a MassifObject the CALLER OWNS - destroy() it, or it stays registered.

      Type Parameters

      • M extends string

      Parameters

      Returns CallResult<C, M>

    • Returns number

    • The object behind an object property, OWNED by the caller (destroy() it); null when empty. Unlike group it hands the object over, e.g. to share a source between layers.

      Type Parameters

      • P extends string

      Parameters

      • path: P

      Returns MassifObject<ClassAtPath<C, P>>

    • Defaults cover a search result; a route's instructions are collect(fn, { countPath: 'instructionCount', method: 'getInstruction' }).

      Type Parameters

      • R

      Parameters

      • map: (
            element: MassifObject<
                ResultClass<C, keyof MethodTypes[C] & "getFeature">,
            >,
            index: number,
        ) => R

      Returns R[]

    • Defaults cover a search result; a route's instructions are collect(fn, { countPath: 'instructionCount', method: 'getInstruction' }).

      Type Parameters

      • M extends string
      • R

      Parameters

      Returns R[]

    • For a geojson source; returns the layer index.

      Parameters

      • name: string

      Returns number

    • Parameters

      • layer: number

      Returns this

    • Subscriptions and pending async calls die with it, so no handler runs against a freed object.

      Returns boolean

    • The path may walk objects (fogOptions.rangeStart), structs (clickInfo.clickType) and free-form data (properties.name). Enums come back as names, positions as [lon, lat], structs as JSON.

      Type Parameters

      • P extends string

      Parameters

      • path: P

      Returns ValueAt<C, P>

    • An empty path means the handle IS the blob.

      Parameters

      • Optionalpath: string

      Returns ArrayBuffer

    • Returns number[]

    • WGS84 [lng, lat] unless a projection is named here or on the subscription. An object whose source projection is unknown is left unconverted: a wrong guess is worse than an unconverted number.

      Type Parameters

      • P extends string

      Parameters

      Returns PositionAt<C, P>

    • A path the tables do not carry - the concrete class is more derived than the declared one.

      Parameters

      Returns Position | Bounds

    • Untyped call for the named wrappers: they know the declaring class, call's C does not.

      Parameters

      • method: string
      • args: readonly unknown[]

      Returns unknown

    • instanceof by class name, e.g. layer.is('massif::RasterTileLayer').

      Parameters

      Returns boolean

    • Escape hatch for paths the tables cannot type: free-form feature properties, a more derived class.

      Parameters

      • Optionalpath: string

      Returns Json

    • BLOCKING: an HTTP source fetches on the calling thread. Use loadTileAsync from the UI thread.

      Parameters

      Returns ArrayBuffer

    • Removes the listener(s) for the specified event name.

      Type Parameters

      • E extends string

      Parameters

      • event: E
      • Optionalcallback: any

        An optional specific event listener to remove (if omitted, all event listeners by this name will be removed).

      • OptionalthisArg: any

        An optional parameter which, when set, will be used to refine search of the correct event listener to be removed.

      Returns void

    • Deliberately NOT widened to string so event-name typos fail; addEventListener takes any name.

      Type Parameters

      • E extends string

      Parameters

      Returns void

    • Adds a listener for the specified event name, which, once fired, will remove itself.

      Type Parameters

      • E extends string

      Parameters

      • event: E
      • callback: (data: MassifEventData<C, E>) => void

        The event listener to add. Will be called when an event of the given name is raised.

      • OptionalthisArg: any

        An optional parameter which, when set, will be bound as the this context when the callback is called. Falsy values will be not be bound.

      Returns void

    • Removes listener(s) for the specified event name.

      Parameters

      • eventNames: string
      • Optionalcallback: any

        An optional parameter pointing to a specific listener. If not defined, all listeners for the event names will be removed.

      • OptionalthisArg: any

        An optional parameter which when set will be used to refine search of the correct callback which will be removed as event listener.

      Returns void

    • Parameters

      • layer: number
      • id: string | number

      Returns this

    • An enum takes its constant name, a position an array.

      Type Parameters

      • P extends string

      Parameters

      Returns this

    • A string is parsed here: args cross as JSON, so text would arrive as a string argument, not a document.

      Parameters

      • layer: number
      • geojson: object | Json

      Returns this

    • Returns a string representation of an object.

      Returns string

    • The same without throwing, for a path that may legitimately not be there.

      Type Parameters

      • P extends string

      Parameters

      Returns number

    • Parameters

      • layer: number
      • feature: object | Json

      Returns this