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...

    Type Alias GeometryPlaceParams

    GeometryPlaceParams: CommonServiceParamsWithZoom & {
        geometries: Place[] | Places;
    }

    Parameters for fetching geometry data from places.

    Type Declaration

    • geometries: Place[] | Places

      Places or place array containing geometry IDs.

      The places must have geometry data sources with IDs. Places without geometry IDs are skipped.

      It accepts an array of Place objects or a Places FeatureCollection.

      // FeatureCollection from search
      geometries: searchResults

      // Array of places
      geometries: [place1, place2, place3]

    Use this when you have place objects (from search results) and want to fetch their boundaries. The function extracts the geometry IDs from the places automatically.

    // From search results
    const searchResults = await discoverPlaces({ query: 'Amsterdam' });
    const params: GeometryPlaceParams = {
    geometries: searchResults,
    zoom: 10
    };

    // From individual places
    const params: GeometryPlaceParams = {
    geometries: [place1, place2],
    zoom: 12
    };