Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface TimelineOptions<P>

Type parameters

  • P

Hierarchy

  • GeoJSONOptions
    • TimelineOptions

Index

Properties

Optional attribution

attribution: undefined | string

Optional drawOnSetTime

drawOnSetTime: undefined | false | true

If true (default), the layer will update as soon as setTime is called.

If false, you must call updateDisplayedLayers() to update the display to the current time. This is useful if you have complex data and performance becomes a concern.

Optional end

end: undefined | number

Optional pane

pane: undefined | string

Optional start

start: undefined | number

Optional style

style: PathOptions | StyleFunction<P>

PathOptions or a Function defining the Path options for styling GeoJSON lines and polygons, called internally when data is added.

The default value is to not override any defaults:

function (geoJsonFeature) {
    return {}
}

Methods

Optional coordsToLatLng

  • coordsToLatLng(coords: [number, number] | [number, number, number]): LatLng
  • A Function that will be used for converting GeoJSON coordinates to LatLngs. The default is the coordsToLatLng static method.

    Parameters

    • coords: [number, number] | [number, number, number]

    Returns LatLng

Optional filter

  • filter(geoJsonFeature: Feature<geojson.GeometryObject, P>): boolean
  • A Function that will be used to decide whether to show a feature or not.

    The default is to show all features:

    function (geoJsonFeature) {
        return true;
    }

    Parameters

    • geoJsonFeature: Feature<geojson.GeometryObject, P>

    Returns boolean

Optional getInterval

  • getInterval(feature: Feature): TimeBounds | false
  • Called for each feature, and should return either a time range for the feature or false, indicating that it should not be included in the timeline.

    If not provided, it assumes that the start/end are already part of the feature object.

    Parameters

    • feature: Feature

    Returns TimeBounds | false

Optional onEachFeature

  • onEachFeature(feature: Feature<geojson.GeometryObject, P>, layer: Layer): void
  • A Function that will be called once for each created Feature, after it has been created and styled. Useful for attaching events and popups to features.

    The default is to do nothing with the newly created layers:

    function (feature, layer) {}

    Parameters

    • feature: Feature<geojson.GeometryObject, P>
    • layer: Layer

    Returns void

Optional pointToLayer

  • pointToLayer(geoJsonPoint: Feature<Point, P>, latlng: LatLng): Layer
  • A Function defining how GeoJSON points spawn Leaflet layers. It is internally called when data is added, passing the GeoJSON point feature and its LatLng.

    The default is to spawn a default Marker:

    function(geoJsonPoint, latlng) {
        return L.marker(latlng);
    }

    Parameters

    • geoJsonPoint: Feature<Point, P>
    • latlng: LatLng

    Returns Layer

Generated using TypeDoc