mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-03-08 02:54:08 +00:00
re-add district to geocodejson
This commit is contained in:
@@ -100,7 +100,7 @@ The following feature attributes are implemented:
|
|||||||
* `type` - value of the main tag of the object (e.g. residential, restaurant, ...)
|
* `type` - value of the main tag of the object (e.g. residential, restaurant, ...)
|
||||||
* `label` - full comma-separated address
|
* `label` - full comma-separated address
|
||||||
* `name` - localised name of the place
|
* `name` - localised name of the place
|
||||||
* `housenumber`, `street`, `locality`, `postcode`, `city`,
|
* `housenumber`, `street`, `locality`, `district`, `postcode`, `city`,
|
||||||
`county`, `state`, `country` -
|
`county`, `state`, `country` -
|
||||||
provided when it can be determined from the address
|
provided when it can be determined from the address
|
||||||
* `admin` - list of localised names of administrative boundaries (only with `addressdetails=1`)
|
* `admin` - list of localised names of administrative boundaries (only with `addressdetails=1`)
|
||||||
|
|||||||
@@ -132,8 +132,10 @@ class AddressDetails
|
|||||||
$aJson['housenumber'] = $aLine['localname'];
|
$aJson['housenumber'] = $aLine['localname'];
|
||||||
} else if ($iRank > 25 && $iRank < 28) {
|
} else if ($iRank > 25 && $iRank < 28) {
|
||||||
$aJson['street'] = $aLine['localname'];
|
$aJson['street'] = $aLine['localname'];
|
||||||
} else if ($iRank >= 17 && $iRank <= 25) {
|
} else if ($iRank >= 22 && $iRank <= 25) {
|
||||||
$aJson['locality'] = $aLine['localname'];
|
$aJson['locality'] = $aLine['localname'];
|
||||||
|
} else if ($iRank >= 17 && $iRank <= 21) {
|
||||||
|
$aJson['district'] = $aLine['localname'];
|
||||||
} else if ($iRank >= 13 && $iRank <= 16) {
|
} else if ($iRank >= 13 && $iRank <= 16) {
|
||||||
$aJson['city'] = $aLine['localname'];
|
$aJson['city'] = $aLine['localname'];
|
||||||
} else if ($iRank >= 10 && $iRank <= 12) {
|
} else if ($iRank >= 10 && $iRank <= 12) {
|
||||||
|
|||||||
@@ -23,5 +23,5 @@ Feature: Parameters for Reverse API
|
|||||||
Scenario: City address with suburb
|
Scenario: City address with suburb
|
||||||
When sending geocodejson reverse coordinates 53.5822,10.0805
|
When sending geocodejson reverse coordinates 53.5822,10.0805
|
||||||
Then results contain
|
Then results contain
|
||||||
| housenumber | street | locality | city | postcode | country |
|
| housenumber | street | district | city | postcode | country |
|
||||||
| 64 | Hinschenfelder Straße | Wandsbek | Hamburg | 22047 | Deutschland |
|
| 64 | Hinschenfelder Straße | Wandsbek | Hamburg | 22047 | Deutschland |
|
||||||
|
|||||||
@@ -23,5 +23,5 @@ Feature: Parameters for Search API
|
|||||||
Scenario: City address with suburb
|
Scenario: City address with suburb
|
||||||
When sending geocodejson search query "hinschenfelder str 64, wandsbek" with address
|
When sending geocodejson search query "hinschenfelder str 64, wandsbek" with address
|
||||||
Then results contain
|
Then results contain
|
||||||
| housenumber | street | locality | city | postcode | country |
|
| housenumber | street | district | city | postcode | country |
|
||||||
| 64 | Hinschenfelder Straße | Wandsbek | Hamburg | 22047 | Deutschland |
|
| 64 | Hinschenfelder Straße | Wandsbek | Hamburg | 22047 | Deutschland |
|
||||||
|
|||||||
Reference in New Issue
Block a user