mirror of
https://github.com/klokantech/tileserver-php.git
synced 2025-08-04 13:47:49 +02:00
Allow to read metadata bounding box also as array
This commit is contained in:
@@ -221,10 +221,10 @@ class Server {
|
|||||||
* @return object
|
* @return object
|
||||||
*/
|
*/
|
||||||
public function metadataValidation($metadata) {
|
public function metadataValidation($metadata) {
|
||||||
if (array_key_exists('bounds', $metadata)) {
|
if (!array_key_exists('bounds', $metadata)) {
|
||||||
|
$metadata['bounds'] = array(-180, -85.06, 180, 85.06);
|
||||||
|
} elseif (!is_array($metadata['bounds'])) {
|
||||||
$metadata['bounds'] = array_map('floatval', explode(',', $metadata['bounds']));
|
$metadata['bounds'] = array_map('floatval', explode(',', $metadata['bounds']));
|
||||||
} else {
|
|
||||||
$metadata['bounds'] = array(-180, -85.051128779807, 180, 85.051128779807);
|
|
||||||
}
|
}
|
||||||
if (!array_key_exists('profile', $metadata)) {
|
if (!array_key_exists('profile', $metadata)) {
|
||||||
$metadata['profile'] = 'mercator';
|
$metadata['profile'] = 'mercator';
|
||||||
|
Reference in New Issue
Block a user