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

Merge pull request #32 from Fil/patch-1

Check which .mbtiles files are readable
This commit is contained in:
Dalibor Janák
2014-06-23 14:44:02 +02:00

View File

@@ -71,13 +71,13 @@ class Server {
$mjs = glob('*/metadata.json');
$mbts = glob('*.mbtiles');
if ($mjs) {
foreach ($mjs as $mj) {
foreach (array_filter($mjs, 'is_readable') as $mj) {
$layer = $this->metadataFromMetadataJson($mj);
array_push($this->fileLayer, $layer);
}
}
if ($mbts) {
foreach ($mbts as $mbt) {
foreach (array_filter($mbts, 'is_readable') as $mbt) {
$this->dbLayer[] = $this->metadataFromMbtiles($mbt);
}
}