TomTom Maps for JavaScript
    Preparing search index...

    Type Alias PolygonFeature<P>

    PolygonFeature: Omit<Feature<Polygon | MultiPolygon, P>, "bbox"> & {
        bbox: BBox;
    }

    A GeoJSON Feature with a polygon or multi-polygon geometry.

    It represents an area on the map, such as:

    • Administrative boundaries (countries, states, cities)
    • Points of interest with building footprints
    • Search areas or geofences
    • Route reachable ranges

    Type Parameters

    Type Declaration

    • bbox: BBox

      The bounding box of the feature's geometry.

    const cityBoundary: PolygonFeature<{ name: string, population: number }> = {
    type: 'Feature',
    geometry: {
    type: 'Polygon',
    coordinates: [[
    [4.8, 52.3],
    [5.0, 52.3],
    [5.0, 52.4],
    [4.8, 52.4],
    [4.8, 52.3]
    ]]
    },
    properties: {
    name: 'Amsterdam',
    population: 872680
    }
    };