This is the documentation of version 1.0.0-rc.2. Go to the latest version, 1.0.0-rc.5.
TomTom Maps for JavaScript
    Preparing search index...

    Interface FeatureCollectionWithProperties<G, P, FeatureCollectionProps>

    A GeoJSON FeatureCollection with an optional properties field at the collection level.

    These come in addition to the properties of the individual features.

    // Collection of routes with summary properties at the collection level
    const routeCollection: FeatureCollectionWithProperties<LineString, RouteProps, { totalDistance: number }> = {
    type: 'FeatureCollection',
    features: [...],
    properties: { totalDistance: 1000 }
    };
    interface FeatureCollectionWithProperties<
        G extends Geometry
        | null = Geometry,
        P = GeoJsonProperties,
        FeatureCollectionProps = unknown,
    > {
        bbox?: BBox;
        features: Feature<G, P>[];
        properties?: FeatureCollectionProps;
        type: "FeatureCollection";
    }

    Type Parameters

    • G extends Geometry | null = Geometry

      The geometry type for features in the collection (defaults to Geometry)

    • P = GeoJsonProperties

      The type of properties for individual features (defaults to GeoJsonProperties)

    • FeatureCollectionProps = unknown

      The type of properties for the collection itself (defaults to unknown)

    Hierarchy

    Index
    bbox?: BBox

    The bounding box of all features in the collection, including any bounding boxes they have. It is present only if the collection has features.

    features: Feature<G, P>[]

    The properties of the whole feature collection, to attach metadata at the collection level.

    type: "FeatureCollection"

    Specifies the type of GeoJSON object.