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.
Validation also rejects a parameter the service doesn't know, and names it. Only top-level names
are checked: an unknown key inside an object parameter, such as filters, goes unreported. To skip validation,
set it to false, which then drops an unknown parameter silently. The commonBaseURL check
(INSECURE_BASE_URL) runs either way.
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.
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.
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.
Places that share a footprint give it the properties of the first of them, the best ranked.
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. A geometry the service
can't return, such as one with an unknown ID, is left out of the result.
// 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.
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.
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.
Places that share a footprint give it the properties of the first of them, the best ranked.
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. A geometry the service
can't return, such as one with an unknown ID, is left out of the result.
// 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.