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

    Type Alias Places<P, FeatureCollectionProps>

    Places: Omit<
        FeatureCollectionWithProperties<Point, P, FeatureCollectionProps>,
        "features" | "bbox",
    > & { bbox?: BBox; features: Place<P>[] }

    A GeoJSON FeatureCollection of the places that search or geocoding operations return.

    Type Parameters

    • P extends CommonPlaceProps = CommonPlaceProps

      Type of individual place properties (defaults to CommonPlaceProps)

    • FeatureCollectionProps = unknown

      Type of collection-level properties

    Type Declaration

    • Optionalbbox?: BBox

      The bounding box of all the places, including their own bounding boxes. It is present only if there are places.

    • features: Place<P>[]

      The place features, each with a required string ID.

    const places: Places<SearchPlaceProps> = {
    type: 'FeatureCollection',
    features: [
    { id: '1', type: 'Feature', geometry: {...}, properties: {...} },
    { id: '2', type: 'Feature', geometry: {...}, properties: {...} }
    ]
    };