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

    Type Alias TrafficIncidentDetailsByBBoxParams

    TrafficIncidentDetailsByBBoxParams: TrafficIncidentDetailsBaseParams & {
        bbox: HasBBox;
        ids?: never;
        polygon?: never;
    }

    Parameters for fetching incidents within a bounding box.

    Type Declaration

    • bbox: HasBBox

      The bounding box to query for incidents.

      It accepts a raw [minLon, minLat, maxLon, maxLat] tuple, any GeoJSON object (Feature, FeatureCollection, Geometry, …), or an array of GeoJSON objects. For a GeoJSON value, its bounding box is calculated automatically with bboxFromGeoJSON.

      It covers at most 10,000 km².

      // Raw bbox tuple
      bbox: [4.728, 52.278, 5.080, 52.479]

      // GeoJSON Feature returned by a geocode call
      const place = await geocodeOne('Amsterdam');
      bbox: place
    • Optionalids?: never
    • Optionalpolygon?: never

    The bounding box must cover an area no larger than 10,000 km².

    // Raw bbox tuple
    const params: TrafficIncidentDetailsByBBoxParams = {
    bbox: [4.728, 52.278, 5.080, 52.479]
    };

    // GeoJSON place returned by geocoding
    const place = await geocodeOne('Amsterdam');
    const params: TrafficIncidentDetailsByBBoxParams = { bbox: place };