TomTom Maps for JavaScript
    Preparing search index...

    Type Alias PolygonFeature<P>

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

    GeoJSON Feature containing polygon or multi-polygon geometry.

    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

      Bounding box that contains 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
    }
    };