up has address logic on set of tags
This commit is contained in:
parent
6560b20f16
commit
b323c2fe9f
1 changed files with 18 additions and 3 deletions
|
|
@ -285,10 +285,25 @@ class Place
|
|||
$this->setHasOpeningHours(!empty($tags['opening_hours']));
|
||||
$this->setHasWheelchair(!empty($tags['wheelchair']));
|
||||
|
||||
// has address logic
|
||||
// has address logic, we set it as complete if there is a set of street AND housenumber in tags, it could be with addr prefix or contact prefix.
|
||||
$this->setHasAddress(
|
||||
!empty($this->getStreet()) && !empty($this->getHousenumber())
|
||||
||
|
||||
(
|
||||
isset($tags['addr:street']) &&
|
||||
isset($tags['addr:housenumber']) &&
|
||||
$tags['addr:street'] != '' &&
|
||||
$tags['addr:housenumber'] != ''
|
||||
)
|
||||
||
|
||||
(
|
||||
isset($tags['contact:street']) &&
|
||||
isset($tags['contact:housenumber']) &&
|
||||
$tags['contact:street'] != '' &&
|
||||
$tags['contact:housenumber'] != ''
|
||||
)
|
||||
|
||||
$this->setHasAddress(!empty($this->getStreet()) && !empty($this->getHousenumber())
|
||||
| (isset($tags['addr:street']) && isset($tags['addr:housenumber'])));
|
||||
);
|
||||
|
||||
// has website logic (with multiple possible tags)
|
||||
$websiteTags = ['website', 'contact:website', 'url', 'contact:url'];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue