Skip to content

Commit

Permalink
docs: rework additional query parameters in forward query
Browse files Browse the repository at this point in the history
  • Loading branch information
robinbourianes-kalisio committed Jan 29, 2025
1 parent 78de594 commit f617f9a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ Returns the list of available geocoding sources according to the target operatio
### /forward?q=searchString[&sources=filterPattern][&viewbox=lon1,lat1,lon2,lat2][&limit=10] (GET)

Performs *forward* geocoding. Requires at least the `q` parameter which is the string that'll be searched in the geocoding sources.
The query supports an optional `sources` allowing users to only perform geocoding in matching sources. The source matching is based on [minimatch](https://github.com/isaacs/minimatch#minimatch).
It also supports the optional `viewbox` parameter, specifying a bounding box to restrict returned matching features. Any two corner points of the box are accepted as long as they make a proper box.
The optional `limit` query parameter allows to limit the number of results returned **per source**. That means if you have a total of `5` sources and you query using a limit of `2`, you'll get at most 10 results.
Additional query parameters include:
- `sources`: allows users to only perform geocoding in matching sources. The source matching is based on [minimatch](https://github.com/isaacs/minimatch#minimatch).
- `viewbox`: specify a bounding box to restrict returned matching features. Any two corner points of the box are accepted as long as they make a proper box, but it needs to be ordered `lon,lat,lon,lat`.
- `limit`: limit the number of results returned **per source**. That means if you have a total of `5` sources and you query using a limit of `2`, you'll get at most 10 results.

> [!NOTE]
> The `NodeGeocoder` sources (`opendatafrance`, `openstreetmap`, ...) use a limit of 10 results per source by default if none is specified in the query.
Expand Down

0 comments on commit f617f9a

Please sign in to comment.