The geometry IDs or places to fetch boundaries for.
Optionalsignal?: AbortSignalAn AbortSignal used to cancel the request.
Aborting rejects the call with an SDKAbortError (its name is 'AbortError')
and cancels the underlying HTTP request, including while the SDK is waiting to retry
a rate-limited (429) response. Aborting a call that already completed has no effect.
To add a deadline, compose signals: AbortSignal.any([mine, AbortSignal.timeout(5000)]).
Keep only the latest search with createLatestRequest:
const latestSearch = createLatestRequest();
const search = await latestSearch.run((signal) => discoverPlaces({ query, signal }));
if (search.current) showResults(search.value);
OptionalvalidateRequest?: booleanWhether the SDK validates the request parameters against the expected schema before sending them.
Optionalzoom?: numberOptional zoom level for geometry detail.
It controls the level of detail in the returned geometry:
Align it with your map's current zoom level, and use a lower zoom for large geographies to reduce data size. Setting it is essential for performance with very large areas.
Polygon features of the area boundaries.
You can fetch up to 20 geometries in a single call, at scales from countries down to building footprints, as standard GeoJSON Polygon/MultiPolygon features.
Use it to display city or country boundaries on maps, show POI building footprints, create geofences for spatial queries, visualise administrative divisions, or calculate areas and spatial relationships.
It returns polygons, not places, so pass the result to GeometriesModule.show(), not
PlacesModule.show(). The geometryId comes from a prior search result.
A Places collection gets each polygon its place's properties, as PlaceGeometryProps.
A polygon the service returns for no place of the collection has null properties. A Place[]
or geometry IDs return the polygons with the service's own properties.
// Fetch geometry by ID
const cityBoundary = await geometryData({
geometries: ['geometry-id-123']
});
// Fetch multiple geometries at once
const boundaries = await geometryData({
geometries: ['country-id-1', 'city-id-2', 'poi-id-3']
});
// Fetch and merge with place data
const searchResults = await discoverPlaces({ query: 'Amsterdam' });
const withBoundaries = await geometryData({
geometries: searchResults // Places with geometry IDs
});
// Each polygon carries its place's properties, or null for none
withBoundaries.features[0].properties?.address.freeformAddress;
Retrieves polygon geometries representing geographic area boundaries.
The Geometry Data service returns coordinate sets that define the outlines of geographic areas such as cities, countries, administrative regions, or POI footprints. Use these polygons to visualise area boundaries, for spatial analysis and in geofencing applications.
The geometry IDs or places to fetch boundaries for.
Polygon features of the area boundaries.
You can fetch up to 20 geometries in a single call, at scales from countries down to building footprints, as standard GeoJSON Polygon/MultiPolygon features.
Use it to display city or country boundaries on maps, show POI building footprints, create geofences for spatial queries, visualise administrative divisions, or calculate areas and spatial relationships.
It returns polygons, not places, so pass the result to GeometriesModule.show(), not
PlacesModule.show(). The geometryId comes from a prior search result.
A Places collection gets each polygon its place's properties, as PlaceGeometryProps.
A polygon the service returns for no place of the collection has null properties. A Place[]
or geometry IDs return the polygons with the service's own properties.
// Fetch geometry by ID
const cityBoundary = await geometryData({
geometries: ['geometry-id-123']
});
// Fetch multiple geometries at once
const boundaries = await geometryData({
geometries: ['country-id-1', 'city-id-2', 'poi-id-3']
});
// Fetch and merge with place data
const searchResults = await discoverPlaces({ query: 'Amsterdam' });
const withBoundaries = await geometryData({
geometries: searchResults // Places with geometry IDs
});
// Each polygon carries its place's properties, or null for none
withBoundaries.features[0].properties?.address.freeformAddress;
Retrieves polygon geometries representing geographic area boundaries.
The Geometry Data service returns coordinate sets that define the outlines of geographic areas such as cities, countries, administrative regions, or POI footprints. Use these polygons to visualise area boundaries, for spatial analysis and in geofencing applications.