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

    Class MapLayers

    Drawn in list order, 0 at the bottom. Facade calls on the adopted Layers only.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    className: "massif::Layers"
    handle: Handle<"massif::Layers">
    id?: string

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

    Accessors

    • get events(): string[]

      Returns string[]

    • get valid(): boolean

      False after destroy, and after the id was dropped.

      Returns boolean

    Methods

    • Appends on top: 0 is the bottom.

      Parameters

      Returns this

    • 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

    • 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

    • A bare Layer: the list does not record the concrete class.

      Parameters

      • index: number

      Returns MassifLayer<"massif::Layer">

    • 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

      Parameters

      • method: M
      • ...args: {
            add: { args: [layer: Handle<any>]; result: void };
            clear: { args: []; result: void };
            get: {
                args: [index: number];
                result: Handle<"massif::Layer">;
                resultClass: "massif::Layer";
            };
            insert: { args: [index: number, layer: Handle<any>]; result: void };
            remove: { args: [layer: Handle<any>]; result: boolean };
            set: { args: [index: number, layer: Handle<any>]; result: void };
        }[M] extends { args: A }
            ? A extends unknown[] ? A<A> : never
            : never

      Returns CallResult<"massif::Layers", M>

    • call on a worker. extract runs INSIDE the delivery, the only time an object result is alive, e.g. (tile) => tile.getData('data'). Scalars and flat arrays need no extract.

      Type Parameters

      Parameters

      • method: M
      • args: {
            add: { args: [layer: Handle<any>]; result: void };
            clear: { args: []; result: void };
            get: {
                args: [index: number];
                result: Handle<"massif::Layer">;
                resultClass: "massif::Layer";
            };
            insert: { args: [index: number, layer: Handle<any>]; result: void };
            remove: { args: [layer: Handle<any>]; result: boolean };
            set: { args: [index: number, layer: Handle<any>]; result: void };
        }[M] extends { args: A }
            ? A extends unknown[] ? A<A> : never
            : never
      • Optionalextract: (result: MassifObject<ResultClass<"massif::Layers", M>>) => R

      Returns CancellablePromise<R>

    • 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 never

      Parameters

      • path: P

      Returns MassifObject<ClassAtPath<"massif::Layers", P>>

    • Returns this

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

      Type Parameters

      • R

      Parameters

      Returns R[]

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

      Type Parameters

      Parameters

      Returns R[]

    • Includes layers the object API put there.

      Returns number

    • 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 "count"

      Parameters

      • path: P

      Returns ValueAt<"massif::Layers", 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 never

      Parameters

      Returns P extends "count"
          ? Extract<{ count: number }[P<P>], Position | Bounds>
          : Position | Bounds

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

      Parameters

      Returns Position | Bounds

    • Parameters

      Returns this

    • 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

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

      Type Parameters

      • E extends never

      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 never

      Parameters

      • event: E
      • callback: (data: MassifEventData<"massif::Layers", E>) => void
      • OptionalthisArg: any

      Returns void

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

      Type Parameters

      • E extends never

      Parameters

      • event: E
      • callback: (data: MassifEventData<"massif::Layers", 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

    • Parameters

      Returns boolean

    • 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

    • Not set: a two-argument overload of the property writer would let layers.set('count', …) typos compile.

      Parameters

      Returns this

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

      Type Parameters

      • P extends never

      Parameters

      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 never

      Parameters

      Returns number