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 will be skipped.

      Supported Formats:

      • Single Place object
      • Array of Place objects
      • 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 will automatically extract geometry IDs from the places.

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

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