nominatim-ui
nominatim-ui copied to clipboard
On details page add link to country
Example https://nominatim.openstreetmap.org/ui/details.html?osmtype=R&osmid=2145268&class=boundary in the address line lists has both 'Germany' and 'de' but no links to their OSM or detail pages.
The API doesn't return the ids but maybe we can still add a link in the UI, even if it goes to a search page.
"address": [
{
"localname": "Bavaria",
"place_id": 235644837,
"osm_id": 2145268,
"osm_type": "R",
"place_type": "state",
"class": "boundary",
"type": "administrative",
"admin_level": 4,
"rank_address": 8,
"distance": 0,
"isaddress": true
},
{
"localname": "Germany",
"place_id": null,
"osm_id": null,
"osm_type": null,
"place_type": null,
"class": "place",
"type": "country",
"admin_level": null,
"rank_address": 4,
"distance": 0,
"isaddress": true
},
{
"localname": "de",
"place_id": null,
"osm_id": null,
"osm_type": null,
"place_type": null,
"class": "place",
"type": "country_code",
"admin_level": null,
"rank_address": 4,
"distance": 0,
"isaddress": false
}
],
We don't have the information about the relevant object on the Nominatim side. The country is computed from the country code and the country_name
table. I see two options here:
- Simply have a search link to the country as you suggested.
- Have a special version of the details page that displays the information from
country_name
(for names etc.),location_area_country
(for the underlying geometry currently used by Nominatim) and links to all places with the given country code and rank_search = 2.
The latter would be really interesting but needs support from the Nominatim API.
See https://github.com/osm-search/Nominatim/issues/1671 for the relevant Nominatim issue.
Hi, is this issue still open? I am new to this so I have understood that the address table needs a OSM-link to the country we get from the country code. Am I right about this? Plz suggest how can I move forward if this issue still exists.
I still prefer the (2) option in https://github.com/osm-search/nominatim-ui/issues/41#issuecomment-718542851 and that requires a change to Nominatim API which hasn't been implemented yet.