Search for a single place by text query.
Convenience function that calls discoverPlaces and returns the first result. Throws an error if no results are found.
Search query string, or the full FuzzySearchParams (bar limit)
limit
Promise resolving to the first matching place
If no results are found for the query
const place = await discoverOnePlace('Vondelpark Amsterdam');console.log(place.properties.poi?.name);const nearby = await discoverOnePlace({ query: 'coffee', geoBias: { position: [4.9041, 52.3676] }, signal }); Copy
const place = await discoverOnePlace('Vondelpark Amsterdam');console.log(place.properties.poi?.name);const nearby = await discoverOnePlace({ query: 'coffee', geoBias: { position: [4.9041, 52.3676] }, signal });
Search for a single place by text query.
Convenience function that calls discoverPlaces and returns the first result. Throws an error if no results are found.