* `type` - value of the main tag of the object (e.g. residential, restaurant, ...)
* `label` - full comma-separated address
* `name` - localised name of the place
- * `housenumber`, `street`, `locality`, `postcode`, `city`,
+ * `housenumber`, `street`, `locality`, `district`, `postcode`, `city`,
`county`, `state`, `country` -
provided when it can be determined from the address
* `admin` - list of localised names of administrative boundaries (only with `addressdetails=1`)
$aJson['housenumber'] = $aLine['localname'];
} else if ($iRank > 25 && $iRank < 28) {
$aJson['street'] = $aLine['localname'];
- } else if ($iRank >= 17 && $iRank <= 25) {
+ } else if ($iRank >= 22 && $iRank <= 25) {
$aJson['locality'] = $aLine['localname'];
+ } else if ($iRank >= 17 && $iRank <= 21) {
+ $aJson['district'] = $aLine['localname'];
} else if ($iRank >= 13 && $iRank <= 16) {
$aJson['city'] = $aLine['localname'];
} else if ($iRank >= 10 && $iRank <= 12) {
Scenario: City address with suburb
When sending geocodejson reverse coordinates 53.5822,10.0805
Then results contain
- | housenumber | street | locality | city | postcode | country |
- | 64 | Hinschenfelder Straße | Wandsbek | Hamburg | 22047 | Deutschland |
+ | housenumber | street | district | city | postcode | country |
+ | 64 | Hinschenfelder Straße | Wandsbek | Hamburg | 22047 | Deutschland |
Scenario: City address with suburb
When sending geocodejson search query "hinschenfelder str 64, wandsbek" with address
Then results contain
- | housenumber | street | locality | city | postcode | country |
- | 64 | Hinschenfelder Straße | Wandsbek | Hamburg | 22047 | Deutschland |
+ | housenumber | street | district | city | postcode | country |
+ | 64 | Hinschenfelder Straße | Wandsbek | Hamburg | 22047 | Deutschland |