For Overpass queries, there’s currently a special case that pulls in a
dedicated string based on the `admin_level=*` if it’s present. Maybe instead we
could use the generic “Administrative Boundary” label, using the normal code
path, but add a suffix like “(Level 3)”?
https://github.com/openstreetmap/openstreetmap-website/blob/7565f5aa4aad13bb45929ba26e82a1ab3ca28210/app/assets/javascripts/index/query.js#L73-L78
For Nominatim queries, if a `place=*` tag is present on either the boundary or
the `label` member, we show that as the label instead of anything related to
the boundary:
https://github.com/openstreetmap/openstreetmap-website/blob/7565f5aa4aad13bb45929ba26e82a1ab3ca28210/app/controllers/geocoder_controller.rb#L101-L107
For example, searching for
“[Wapakoneta](https://www.openstreetmap.org/search?query=Wapakoneta#map=13/40.56551/-84.19397)”
returns [this `boundary=administrative` `admin_level=8`
relation](https://www.openstreetmap.org/relation/182636) but labels it as a
“Town” based on the `place=town` tag on [this `label`
member](https://www.openstreetmap.org/node/153976720). The label doesn’t call
it a “boundary” of any sort, even if that’s what gets highlighted when you
select the result. This is pretty reasonable, because the boundary represents a
populated place that we’d tag as a `place=town` regardless of the boundary or
legal designation. However, for something that doesn’t represent a populated
place, such as a U.S. county or a French department, a `label` wouldn’t be as
relevant or appropriate, so there still needs to be a “boundary” label for the
search result.
I think it would be possible to use a suffix here too. It would need some
additional translatable format strings.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5450#issuecomment-2565817707
You are receiving this because you are subscribed to this thread.
Message ID:
<openstreetmap/openstreetmap-website/issues/5450/2565817...@github.com>
_______________________________________________
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev