TomTom Maps for JavaScript
    Preparing search index...

    Type Alias SearchGeometryInput

    SearchGeometryInput: Polygon | MultiPolygon | Circle | PolygonFeatures

    Union type of all supported geometry search input formats.

    Accepts standard GeoJSON polygons/multipolygons, custom circles, or polygon feature collections (such as those returned from previous searches or the geometry data service).

    Flexibility:

    • Mix different geometry types in a single search
    • Use results from geometryData directly
    • Pass search results with geometries as boundaries
    • Define custom polygons for precise area searches
    // Using different geometry types
    const geometries: SearchGeometryInput[] = [
    // Circle
    { type: 'Circle', coordinates: [4.9, 52.3], radius: 1000 },

    // Polygon
    {
    type: 'Polygon',
    coordinates: [[
    [4.88, 52.36], [4.90, 52.36], [4.90, 52.38], [4.88, 52.38], [4.88, 52.36]
    ]]
    },

    // From previous geometry data call
    cityBoundaries // PolygonFeatures
    ];