From ce485c67135c607f84170c20ad488689e9e4073c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dalibor=20Jan=C3=A1k?= Date: Wed, 17 Feb 2016 11:39:16 +0100 Subject: [PATCH] Allow to read metadata bounding box also as array --- tileserver.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tileserver.php b/tileserver.php index 3ed04f6..9011f93 100644 --- a/tileserver.php +++ b/tileserver.php @@ -221,10 +221,10 @@ class Server { * @return object */ 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'])); - } else { - $metadata['bounds'] = array(-180, -85.051128779807, 180, 85.051128779807); } if (!array_key_exists('profile', $metadata)) { $metadata['profile'] = 'mercator';