Skip to content

Commit

Permalink
Read note_area value from capabilities XML.
Browse files Browse the repository at this point in the history
  • Loading branch information
kenguest committed Nov 17, 2019
1 parent 24b6ca7 commit 1c8bf39
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions Services/OpenStreetMap/Config.php
Expand Up @@ -101,6 +101,14 @@ class Services_OpenStreetMap_Config
*/
protected $areaMaximum = null;

/**
*
* Max size of area in relation to notes
*
* @var mixed
*/
protected $noteAreaMaximum = null;

/**
* Status of Database server: online, readonly or offline.
*
Expand Down Expand Up @@ -575,6 +583,12 @@ private function _checkCapabilities($capabilities): bool
'maximum'
);

$this->noteAreaMaximum = (int) $this->getXmlValue(
$xml,
'note_area',
'maximum'
);

$this->databaseStatus = $this->getXmlValue(
$xml,
'status',
Expand Down Expand Up @@ -620,6 +634,16 @@ public function getMaxArea(): float
return $this->areaMaximum;
}

/**
* Max size of area in relation to notes
*
* @return int
*/
public function getMaxNoteArea(): int
{
return $this->noteAreaMaximum;
}

/**
* Minimum API version supported by connected server.
*
Expand Down

0 comments on commit 1c8bf39

Please sign in to comment.