Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface VectorSourceOptions

A data type that provides the configuration options for a combined source instance.

Hierarchy

Index

Properties

Optional animation

animation: AnimationOptions

Animation options for the map content source.

Note that not all options will be used since this source's animation is managed by a parent timeline animation.

Optional data

data: { coordinate?: (data: any) => Coordinate; formatter?: (data: any) => any; geometry?: (data: any) => any; items?: any[]; properties?: { category?: string; id: string; path?: string; points?: string | string[]; root?: string; timestamp?: string | { from: string; to: string }; value?: string | ((data: any) => string) }; request?: { action?: ApiAction; endpoint?: string; parameters?: any }; reversedCoord?: boolean; service?: ApiRequest | (() => ApiRequest); url?: string | ((params: any) => string) }

Provides data configuration options for the data source.

Type declaration

  • Optional coordinate?: (data: any) => Coordinate

    A function that returns the geographical coordinate based on the model object.

  • Optional formatter?: (data: any) => any

    An optional formatter function that can be used to format layer data before being processed for rendering on the map. This function receives the entire dataset loaded for the layer and should return the formatted data to use when rendering map elements.

      • (data: any): any
      • Parameters

        • data: any

        Returns any

  • Optional geometry?: (data: any) => any

    A function that returns the shape's GeoJSON geometry based on the model object.

      • (data: any): any
      • Parameters

        • data: any

        Returns any

  • Optional items?: any[]

    An array of objects to display on the map. If this value is provided, then data will not be requested from a remote source.

  • Optional properties?: { category?: string; id: string; path?: string; points?: string | string[]; root?: string; timestamp?: string | { from: string; to: string }; value?: string | ((data: any) => string) }

    Data property key associations.

    • Optional category?: string

      Property key path to use for an object's category or grouping, if any.

      If the model is represented as a polygon or polyline by a valid path key path and each path's category is defined on the path object, prefix this category key path with [path]. This will use category property relative to the path's object instead of the model's root object.

    • id: string

      Property key path to use for an object's identifier.

    • Optional path?: string

      Property key path to use for the object's coordinate path that defines the shape. If the value of this property is an array, then multiple paths will be rendered on the map for the model.

    • Optional points?: string | string[]

      Property key path that contains the point/coordinate data for the layer. This value can also be an array of key paths, in which case the points will be combined when rendering the data source's points on the map.

    • Optional root?: string

      Key path to the root of the node containing the array of data elements (e.g. features). If not provided, then the root node is assumed to contain the array of data elements.

    • Optional timestamp?: string | { from: string; to: string }

      Property key path to use for the object's date/time. Can be a single value or an object providing a range as from and to property key paths.

    • Optional value?: string | ((data: any) => string)

      Key path of the property that contains the data's value for each object in the response. This can also be a function that receives the model's data and returns the value to use in case additional formatting needs to occur on the value.

  • Optional request?: { action?: ApiAction; endpoint?: string; parameters?: any }

    Configuration options to use when requesting data for the layer (for vector content sources only).

    • Optional action?: ApiAction

      API action to use for the request. Default value is ApiAction.WITHIN for point content sources and ApiAction.SEARCH for shape content sources.

    • Optional endpoint?: string

      API endpoint to use for the request.

    • Optional parameters?: any

      Defines the request parameters to use when requesting data for the layer.

  • Optional reversedCoord?: boolean

    A Boolean indicating whether the data's coordinate arrays are reversed from the GeoJSON standard (e.g. [lat, lon] instead of the default of [lon, lat]).

  • Optional service?: ApiRequest | (() => ApiRequest)

    The ApiRequest instance to use when loading API data for the data source. Either an instance of ApiRequest or configuration options to use when requesting data for the layer (for vector content sources only).

  • Optional url?: string | ((params: any) => string)

    The URL string to request data from for the data source. Value may be a function that receives information about the map, such as current coordinate bounds, to format a URL string before returning.

Optional id

id: string

Unique identifier for the source.

Optional refresh

refresh: number

Data auto-update interval, in seconds. Default value is 0, which disables auto-updating.

Optional requiresBounds

requiresBounds: boolean

Whether the data source requests data for the visible map bounds. If true, then data will be reloaded whenever the map's visible region changes. Default value is false.

Optional restrictToTimeline

restrictToTimeline: boolean

Whether the data source requests should be restricted to the from/to time range associated with the timeline. Set this value to false if you want to control the data's time range outside of the data source. Default is true.

Optional style

Style associated with the source.

Generated using TypeDoc