Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface SpaceProviderOptions

Options to configure the XYZ SpaceProvider.

Hierarchy

Index

Properties

Optional clip

clip: boolean

Indicates if result geometry of tile requests should be clipped.

defaultvalue

false

credentials

credentials: { access_token: string }

User credential of the provider, a valid credential needs to contain the "access_token".

Type declaration

  • access_token: string

    the token to access the space of XYZ Hub endpoint. You can get a token by following the instructions in this guide.

Optional editable

editable: boolean

Allow or prevent editing by the editor.Editor module.

defaultvalue

false

Optional enforceRandomFeatureId

enforceRandomFeatureId: boolean

Enforce random ids for newly created features. If "enforceRandomFeatureId" is set to true, the ids of features created by editor.addFeature are ignored and randomly created. If "enforceRandomFeatureId" is set to false, ids of features created by editor.addFeature can be set. Random ids are only generated if none have been set.

defaultvalue

true

Optional headers

headers: {}

Set custom url service headers. Custom headers will be applied to all request done by provider.

Type declaration

  • [header: string]: string

Optional hooks

hooks: { Coordinates.update?: CoordinatesUpdateHook | CoordinatesUpdateHook[]; Feature.remove?: FeatureRemoveHook | FeatureRemoveHook[]; Navlink.disconnect?: NavlinkDisconnectHook | NavlinkDisconnectHook[]; Navlink.split?: NavlinkSplitHook | NavlinkSplitHook[] }

Add hook functions that will be called during the execution of the corresponding "editing operation". The "hooks" option is a map with the "editing operation" as its key and the corresponding Hook or Array of Hook function(s) as its value.

Available editing operations are 'Navlink.disconnect', 'Navlink.split', 'Feature.remove', 'Coordinates.remove'.

see

editor.Editor.addHook

Type declaration

  • Optional Coordinates.update?: CoordinatesUpdateHook | CoordinatesUpdateHook[]

    The CoordinatesUpdateHook(s) will be called whenever the coordinates of a feature are added, updated or removed ('Coordinates.update' operation).

  • Optional Feature.remove?: FeatureRemoveHook | FeatureRemoveHook[]

    The FeatureRemoveHook(s) will be called when a feature is being removed ('Feature.remove' operation).

  • Optional Navlink.disconnect?: NavlinkDisconnectHook | NavlinkDisconnectHook[]

    The NavlinkDisconnectHook(s) will be called whenever a Navlink is disconnected from an intersection ('Navlink.disconnect' operation).

  • Optional Navlink.split?: NavlinkSplitHook | NavlinkSplitHook[]

    The NavlinkSplitHook(s) will be called whenever a Navlink is devided into two new Navlinks. ('Navlink.split' operation).

Optional https

https: boolean

Indicates if the requests should be made with https.

defaultvalue

true

Optional id

id: string

optional id to identify the provider.

Optional ignoreTileQueryLimit

ignoreTileQueryLimit: boolean

To prevent an overwhelming volume of tile requests, any requests for zoom levels lower than the provider's setting are disregarded. Enabling "ignoreTileQueryLimit" will bypass the tile query limit but may risk browser crashes.

defaultvalue

false

level

level: number

The zoomlevel at which tiles should be loaded from remote and a local index gets created.

Optional margin

margin: number

Tile margin of the provider.

Optional name

name: string

Name of the provider.

Optional params

params: {}

Set custom url parameters. Custom parameters will be applied to all request done by provider.

Type declaration

  • [paramter: string]: string

Optional propertySearch

propertySearch: {}

define property search query to enable remote filtering by property search.

see

https://www.here.xyz/api/devguide/propertiessearch/

defaultvalue

null

Type declaration

  • [name: string]: { operator: "=" | "!=" | ">" | ">=" | "<" | "<="; value: any | any[] }
    • operator: "=" | "!=" | ">" | ">=" | "<" | "<="
    • value: any | any[]

space

space: string

Optional tags

tags: false | string | string[]

Indicates the tag(s) that should be set in the requests.

defaultvalue

false

Optional url

url: string

Base URL of the SpaceProvider. It should point to a XYZ-Hub space endpoint.

defaultvalue

"https://xyz.api.here.com/hub/spaces"

Optional withCredentials

withCredentials: boolean

Indicates if requests are made with credentials.

defaultvalue

false

Methods

Optional postProcessor

  • PostProcessor for remote data sources. The PostProcessor will be executed just before created/modified or removed Features will be sent to the remote backend. If the processor function is returning the processed data then its treated as a synchronous processor. If the processor function does not return any value (undefined) or a Promise then its treated as asynchronous processor. An asynchronous processor that's not using a Promise MUST call the input.ready(..) callback when data processing is finished.

    Due to the execution of the processor in a separate worker thread the processor function must be scope independent. The processor must be a "standalone function/class" that only depends on its own scope and only accesses its own local variables. No references to the outer scope of the processor function are allowed.

    example
    // PostProcessorData:
     {put: GeoJsonFeature[],remove: GeoJsonFeature[]}
    // PostProcessor:
     ({data: PostProcessorData, ready: (data) => void}) => PostProcessorData | Promise<GeoJsonFeature[]>
    

    Parameters

    Returns { put: GeoJSONFeature[]; remove: GeoJSONFeature[] } | Promise<{ put: GeoJSONFeature[]; remove: GeoJSONFeature[] }>

Optional preProcessor

  • PreProcessor for remote data sources. The PreProcessor will be executed just after Features are received from remote backend. If the processor function is returning the processed data then its treated as a synchronous processor. If the processor function does not return any value (undefined) or a Promise then its treated as asynchronous processor. An asynchronous processor that's not using a Promise MUST call the input.ready(..) callback when data processing is finished.

    Due to the execution of the processor in a separate worker thread the processor function must be scope independent. The processor must be a "standalone function/class" that only depends on its own scope and only accesses its own local variables. No references to the outer scope of the processor function are allowed.

    example
    // PreProcessor:
     ({data: any[], ready: (GeoJsonFeature[]) => void, tile?:{x:number,y:number,z:number}) => GeoJsonFeature[] | Promise<GeoJsonFeature[]>
    

    Parameters

    • input: { data: any[]; ready: (features: GeoJSONFeature[]) => void; tile?: { x: number; y: number; z: number } }
      • data: any[]
      • ready: (features: GeoJSONFeature[]) => void
      • Optional tile?: { x: number; y: number; z: number }
        • x: number
        • y: number
        • z: number

    Returns GeoJSONFeature[] | Promise<GeoJSONFeature[]>

Generated using TypeDoc