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

    Class MassifMap

    Addressed through its Options: fog, sky, light, terrain, camera limits... all hang off it.

    Hierarchy (View Summary)

    Index

    Constructors

    • Parameters

      • handle: Handle<"massif::Options">
      • id: string
      • view: MapViewLike
      • Optionalnative: { layers: number; view: number }

        Set when the native view registered its own map, view and layers: they go with the view, not with this wrapper.

      Returns MassifMap

    Properties

    className: "massif::Options"
    handle: Handle<"massif::Options">
    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

    • Type Parameters

      Parameters

      • layer: L
      • Optionalindex: number

      Returns L

    • 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

    • Type Parameters

      • T extends SpecType<"layer">

      Parameters

      • id: string
      • spec: SpecArg<"layer", T>

      Returns MassifLayer<ClassOfSpec<"layer", T>>

    • Parameters

      • spec: {}

      Returns MassifObject<"massif::Marker">

    • Parameters

      • spec: {}

      Returns MassifObject<"massif::BalloonPopup">

    • Parameters

      • id: string
      • nativeLayer: any
      • OptionalclassName: ClassName

      Returns MassifLayer

    • 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

      • values: Partial<{ [P in WritablePath<C>]: WriteAt<C, P> }>

      Returns this

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

      Parameters

      • event: string

      Returns void

    • Owned by the map but not placed: for add(layer, index) or layers().insert(...).

      Type Parameters

      • T extends SpecType<"layer">

      Parameters

      • id: string
      • spec: SpecArg<"layer", T>

      Returns MassifLayer<ClassOfSpec<"layer", T>>

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

      Parameters

      • method: M
      • ...args: {}[M] extends {} ? A extends unknown[] ? A<A> : never : never

      Returns CallResult<"massif::Options", 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: {}[M] extends {} ? A extends unknown[] ? A<A> : never : never
      • Optionalextract: (result: MassifObject<ResultClass<"massif::Options", M>>) => R

      Returns CancellablePromise<R>

    • Returns MapCamera

    • Returns number

    • wait holds the capture until the tiles have settled.

      Parameters

      • Optionalwait: boolean

      Returns Promise<any>

    • The next rendered frame as PNG bytes, through the facade: it needs no object API. wait holds the capture until the tiles have settled. Null when the capture failed or timed out.

      Parameters

      • Optionalwait: boolean

      Returns CancellablePromise<ArrayBuffer>

    • 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 ObjectPath<"massif::Options">

      Parameters

      • path: P

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

    • 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

      • M extends never
      • R

      Parameters

      Returns R[]

    • Releases every id the map built, not the view: the object API's map keeps working.

      Returns boolean

    • sourceSpec is for a map not in lon/lat; only the first call uses it.

      Parameters

      • OptionalsourceSpec: {}

      Returns MassifElements

    • Shorthand for eventOptions({ projection }).

      Parameters

      • name: ProjectionName

      Returns this

    • Parameters

      • Optionalspec: {}

      Returns PropertyGroup<"massif::FogOptions">

    • 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
            | "ambientLightColor"
            | "clearColor"
            | "clickTypeDetection"
            | "debugTileBorders"
            | "doubleClickDetection"
            | "doubleClickMaxDuration"
            | "drawDistance"
            | "envelopeThreadPoolSize"
            | "fieldOfViewY"
            | "focusPointOffset"
            | "freeRoamLookSensitivity"
            | "freeRoamMode"
            | "freeRoamMoveSpeed"
            | "kineticPan"
            | "kineticRotation"
            | "kineticZoom"
            | "layersLabelsProcessedInReverseOrder"
            | "longClickDuration"
            | "mainLightColor"
            | "mainLightDirection"
            | "panBounds"
            | "panningMode"
            | "panningSpeedMode"
            | "pivotMode"
            | "renderProjectionMode"
            | "restrictedPanning"
            | "rotatable"
            | "rotationGestures"
            | "seamlessPanning"
            | "skyColor"
            | "tileDrawSize"
            | "tileLODFactor"
            | "tileThreadPoolSize"
            | "tiltGestureReversed"
            | "tiltRange"
            | "userInput"
            | "zoomGestures"
            | "zoomRange"
            | `terrainOptions.surfaceColorParams.${string}`
            | `terrainOptions.surfaceParams.${string}`
            | `terrain.surfaceColorParams.${string}`
            | `terrain.surfaceParams.${string}`
            | "DPI"
            | "background.bytesPerPixel"
            | "background.colorFormat"
            | "background.height"
            | "background.width"
            | "backgroundBitmap.bytesPerPixel"
            | "backgroundBitmap.colorFormat"
            | "backgroundBitmap.height"
            | "backgroundBitmap.width"
            | "baseProjection.bounds"
            | "baseProjection.name"
            | "clickMovingTolerance"
            | "fog.color"
            | "fog.enabled"
            | "fog.highColor"
            | "fog.horizonBlend"
            | "fog.rangeEnd"
            | "fog.rangeStart"
            | "fog.shaderSource"
            | "fog.spaceColor"
            | "fog.starIntensity"
            | "fog.verticalRangeEnd"
            | "fog.verticalRangeStart"
            | "fogOptions.color"
            | "fogOptions.enabled"
            | "fogOptions.highColor"
            | "fogOptions.horizonBlend"
            | "fogOptions.rangeEnd"
            | "fogOptions.rangeStart"
            | "fogOptions.shaderSource"
            | "fogOptions.spaceColor"
            | "fogOptions.starIntensity"
            | "fogOptions.verticalRangeEnd"
            | "fogOptions.verticalRangeStart"
            | "labelPadding"
            | "labelViewDistance"
            | "light.ambientColor"
            | "light.ambientIntensity"
            | "light.dayCycleLightStops"
            | "light.dayCycleLightsEnabled"
            | "light.dayCycleRisingLightStops"
            | "light.shadowBias"
            | "light.shadowCascades"
            | "light.shadowCasterMargin"
            | "light.shadowDistance"
            | "light.shadowFollowsBuildingHeight"
            | "light.shadowMapSize"
            | "light.shadowMinSunAltitude"
            | "light.shadowNormalOffset"
            | "light.shadowSoftness"
            | "light.shadowStrength"
            | "light.sunAltitude"
            | "light.sunAzimuth"
            | "light.sunColor"
            | "light.sunIntensity"
            | "light.sunOverridingStyle"
            | "light.terrainLightingEnabled"
            | "light.terrainShadowCastingEnabled"
            | "lightOptions.ambientColor"
            | "lightOptions.ambientIntensity"
            | "lightOptions.dayCycleLightStops"
            | "lightOptions.dayCycleLightsEnabled"
            | "lightOptions.dayCycleRisingLightStops"
            | "lightOptions.shadowBias"
            | "lightOptions.shadowCascades"
            | "lightOptions.shadowCasterMargin"
            | "lightOptions.shadowDistance"
            | "lightOptions.shadowFollowsBuildingHeight"
            | "lightOptions.shadowMapSize"
            | "lightOptions.shadowMinSunAltitude"
            | "lightOptions.shadowNormalOffset"
            | "lightOptions.shadowSoftness"
            | "lightOptions.shadowStrength"
            | "lightOptions.sunAltitude"
            | "lightOptions.sunAzimuth"
            | "lightOptions.sunColor"
            | "lightOptions.sunIntensity"
            | "lightOptions.sunOverridingStyle"
            | "lightOptions.terrainLightingEnabled"
            | "lightOptions.terrainShadowCastingEnabled"
            | "modelAnimationsEnabled"
            | "modelShadowsEnabled"
            | "orbitAroundPivot"
            | "projection.bounds"
            | "projection.name"
            | "sky.atmosphereColor"
            | "sky.atmosphereLuminance"
            | "sky.atmosphereSunIntensity"
            | "sky.enabled"
            | "sky.groundColor"
            | "sky.haloColor"
            | "sky.horizonBlend"
            | "sky.horizonColor"
            | "sky.quality"
            | "sky.shaderSource"
            | "sky.skyColor"
            | "sky.sunDiscEnabled"
            | "sky.type"
            | "skyOptions.atmosphereColor"
            | "skyOptions.atmosphereLuminance"
            | "skyOptions.atmosphereSunIntensity"
            | "skyOptions.enabled"
            | "skyOptions.groundColor"
            | "skyOptions.haloColor"
            | "skyOptions.horizonBlend"
            | "skyOptions.horizonColor"
            | "skyOptions.quality"
            | "skyOptions.shaderSource"
            | "skyOptions.skyColor"
            | "skyOptions.sunDiscEnabled"
            | "skyOptions.type"
            | "terrain.alwaysDecode"
            | "terrain.autoFlattenDuration"
            | "terrain.autoFlattenParallax"
            | "terrain.autoFlattenRiseDuration"
            | "terrain.autoFlattenTilt"
            | "terrain.backgroundBitmapEnabled"
            | "terrain.backgroundColor"
            | "terrain.billboardOcclusionEnabled"
            | "terrain.billboardOcclusionTolerance"
            | "terrain.bridges3DEnabled"
            | "terrain.cameraClampDuration"
            | "terrain.cameraClearance"
            | "terrain.cameraClearanceFraction"
            | "terrain.depthBias"
            | "terrain.drapeCacheSize"
            | "terrain.drapeFillsEnabled"
            | "terrain.drapeLinesEnabled"
            | "terrain.drapeResolution"
            | "terrain.drapeWorkingSet"
            | "terrain.elevationCacheSize"
            | "terrain.elevationPrefetchEnabled"
            | "terrain.enabled"
            | "terrain.exaggeration"
            | "terrain.flattenMode"
            | "terrain.flattenRatio"
            | "terrain.flattened"
            | "terrain.focusLift"
            | "terrain.maxTileZoomCoarsening"
            | "terrain.maxTileZoomOffset"
            | "terrain.maxZoom"
            | "terrain.meshCacheSize"
            | "terrain.meshResolution"
            | "terrain.minZoom"
            | "terrain.noDrapeLayerFilter"
            | "terrain.normalSampleDistance"
            | "terrain.postProcessDownscale"
            | "terrain.seamlessTileEdgesEnabled"
            | "terrain.sharedGroundEnabled"
            | "terrain.subdivideDistance"
            | "terrain.surfaceColorParams"
            | "terrain.surfaceNodeResolution"
            | "terrain.surfaceParams"
            | "terrain.surfaceShaderSource"
            | "terrain.switching"
            | "terrain.textOcclusionOpacity"
            | "terrain.tileEdgeStitchingEnabled"
            | "terrain.viewDistance"
            | "terrain.viewDistanceFactor"
            | "terrain.viewDistanceMax"
            | "terrainOptions.alwaysDecode"
            | "terrainOptions.autoFlattenDuration"
            | "terrainOptions.autoFlattenParallax"
            | "terrainOptions.autoFlattenRiseDuration"
            | "terrainOptions.autoFlattenTilt"
            | "terrainOptions.backgroundBitmapEnabled"
            | "terrainOptions.backgroundColor"
            | "terrainOptions.billboardOcclusionEnabled"
            | "terrainOptions.billboardOcclusionTolerance"
            | "terrainOptions.bridges3DEnabled"
            | "terrainOptions.cameraClampDuration"
            | "terrainOptions.cameraClearance"
            | "terrainOptions.cameraClearanceFraction"
            | "terrainOptions.depthBias"
            | "terrainOptions.drapeCacheSize"
            | "terrainOptions.drapeFillsEnabled"
            | "terrainOptions.drapeLinesEnabled"
            | "terrainOptions.drapeResolution"
            | "terrainOptions.drapeWorkingSet"
            | "terrainOptions.elevationCacheSize"
            | "terrainOptions.elevationPrefetchEnabled"
            | "terrainOptions.enabled"
            | "terrainOptions.exaggeration"
            | "terrainOptions.flattenMode"
            | "terrainOptions.flattenRatio"
            | "terrainOptions.flattened"
            | "terrainOptions.focusLift"
            | "terrainOptions.maxTileZoomCoarsening"
            | "terrainOptions.maxTileZoomOffset"
            | "terrainOptions.maxZoom"
            | "terrainOptions.meshCacheSize"
            | "terrainOptions.meshResolution"
            | "terrainOptions.minZoom"
            | "terrainOptions.noDrapeLayerFilter"
            | "terrainOptions.normalSampleDistance"
            | "terrainOptions.postProcessDownscale"
            | "terrainOptions.seamlessTileEdgesEnabled"
            | "terrainOptions.sharedGroundEnabled"
            | "terrainOptions.subdivideDistance"
            | "terrainOptions.surfaceColorParams"
            | "terrainOptions.surfaceNodeResolution"
            | "terrainOptions.surfaceParams"
            | "terrainOptions.surfaceShaderSource"
            | "terrainOptions.switching"
            | "terrainOptions.textOcclusionOpacity"
            | "terrainOptions.tileEdgeStitchingEnabled"
            | "terrainOptions.viewDistance"
            | "terrainOptions.viewDistanceFactor"
            | "terrainOptions.viewDistanceMax"
            | "tileLODMaxZoomLevelsOnScreen"
            | "tileLODProfile"
            | "tileLODTileCountRatio"
            | "tileStyleZoomLift"
            | "zoomOffset"
            | `focusPointOffset.${string}`
            | `mainLightDirection.${string}`
            | `panBounds.${string}`
            | `tiltRange.${string}`
            | `zoomRange.${string}`
            | `baseProjection.bounds.${string}`
            | `light.dayCycleLightStops.${string}`
            | `light.dayCycleRisingLightStops.${string}`
            | `lightOptions.dayCycleLightStops.${string}`
            | `lightOptions.dayCycleRisingLightStops.${string}`
            | `projection.bounds.${string}`

      Parameters

      • path: P

      Returns ValueAt<"massif::Options", 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 PositionPath<"massif::Options">

      Parameters

      • path: P
      • Optionalprojection: ProjectionName

      Returns P extends Path<"massif::Options">
          ? Extract<
              {
                  [key: `terrain.surfaceColorParams.${string}`]: number;
                  [key: `terrain.surfaceParams.${string}`]: number;
                  [key: `terrainOptions.surfaceColorParams.${string}`]: number;
                  [key: `terrainOptions.surfaceParams.${string}`]: number;
              }[P<P>],
              Bounds
              | Position,
          >
          : Bounds | Position

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

      Parameters

      • path: string & {}
      • Optionalprojection: ProjectionName

      Returns Bounds | Position

    • Type Parameters

      • P extends ObjectPath<"massif::Options">

      Parameters

      • path: P

      Returns PropertyGroup<ClassAtPath<"massif::Options", P>>

    • 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

      • className: ClassName

      Returns boolean

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

      Parameters

      • Optionalpath: string

      Returns Json

    • A layer this map added or adopted, by the id it was given.

      Parameters

      • id: string

      Returns MassifLayer<any>

    • Includes layers the object API put there.

      Returns number

    • Returns MapLayers

    • Parameters

      • Optionalspec: {}

      Returns PropertyGroup<"massif::LightOptions">

    • OWNED by this map and released with it; module-level create is for something shared.

      Type Parameters

      • K extends Kind
      • T extends string

      Parameters

      • kind: K
      • id: string
      • spec: SpecArg<K, T>

      Returns MassifObject<ClassOfSpec<K, T>>

    • Type Parameters

      • C extends ClassName

      Parameters

      • kind: string
      • id: string
      • spec: { type: string } & { [key: string]: Json }
      • className: C

      Returns MassifObject<C>

      create - className is required, for the same reason.

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

      Type Parameters

      • E extends EventName<"massif::Options">

      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 EventName<"massif::Options">

      Parameters

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

      Returns void

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

      Type Parameters

      • E extends EventName<"massif::Options">

      Parameters

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

    • The layer stays registered until it is destroyed.

      Parameters

      Returns boolean

    • Rarely needed: the SDK redraws on picture-changing writes. For off-UI-thread changes or a view hidden while moving.

      Returns this

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

      Type Parameters

      • P extends WritablePath<"massif::Options">

      Parameters

      • path: P
      • value: WriteAt<"massif::Options", P>

      Returns this

    • Returns { height: number; width: number }

    • Parameters

      • Optionalspec: {}

      Returns PropertyGroup<"massif::SkyOptions">

    • Type Parameters

      • T extends SpecType<"source">

      Parameters

      • id: string
      • spec: SpecArg<"source", T>

      Returns MassifSource<ClassOfSpec<"source", T>>

    • Worth an id when the app talks to it later: a layer's style property cannot be read back as a handle.

      Type Parameters

      • T extends "mbvt"

      Parameters

      • id: string
      • spec: SpecArg<"style", T>

      Returns MassifObject<ClassOfSpec<"style", T>>

    • The elevation decoder comes from the source's own encoding.

      Parameters

      • Optionalspec: {}

      Returns PropertyGroup<"massif::TerrainOptions">

    • 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 WritablePath<"massif::Options">

      Parameters

      • path: P
      • value: WriteAt<"massif::Options", P>

      Returns number