1
0
mirror of https://github.com/klokantech/tileserver-php.git synced 2025-08-02 12:47:31 +02:00

Allow to read metadata bounding box also as array

This commit is contained in:
Dalibor Janák
2016-02-17 11:39:16 +01:00
parent ab7862209a
commit ce485c6713

View File

@@ -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';