Currently, searching for a location in a workspace app’s geometry parameter window appends the search bar contents to Nominatim’s URL.
Example 1:
- Nominatim URL: https://nominatim.openstreetmap.org/
- Search entered in workspace app: “vancouver”
- Appended Content: “search.php?q=vancouver&format=jsonv2”
- Resulting GET request: https://nominatim.openstreetmap.org/search.php?q=vancouver&format=jsonv2
What gets appended does not allow users or workspace app authors to include additional parameters limiting users’ search results in the Nominatim URL. Adding parameters that are compatible with the q parameter such as countrycodes, limit, and layer to the Nominatim URL breaks the resulting GET request.
Example 2:
- Nominatim URL with parameters added: https://nominatim.openstreetmap.org/search.php?countrycodes=ca&limit=1
- Search entered in workspace app: “vancouver”
- Appended Content: “search.php?q=vancouver&format=jsonv2”
- Resulting GET request (invalid): https://nominatim.openstreetmap.org/search.php?countrycodes=ca&limit=1search.php?q=vancouver&format=jsonv2
FME Flow should check if the Nominatim URL already includes parameters designed to limit users’ search results before deciding what to append so the final result is always a valid GET request such as: https://nominatim.openstreetmap.org/search.php?countrycodes=ca&limit=1&q=vancouver&format=jsonv2
The current workaround is to add the additional parameters in the search bar. Example: “vancouver&countrycodes=ca&limit=1” This is cumbersome for users.
Posted from: