1
0
mirror of https://github.com/klokantech/tileserver-php.git synced 2025-08-05 14:18:13 +02:00

Minor warning with some php configurations fixed.

This commit is contained in:
Dalibor Janák
2016-03-21 13:40:33 +01:00
parent 2dfd2fcb5f
commit c158bcbe57

View File

@@ -1,5 +1,8 @@
<?php <?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
/* /*
* TileServer.php project * TileServer.php project
* ====================== * ======================
@@ -868,7 +871,7 @@ class Wmts extends Server {
2132.72958384978574031265); 2132.72958384978574031265);
$tileMatrixSet = array(); $tileMatrixSet = array();
for($i = 0; $i <= count($scaleDenominators); $i++){ for($i = 0; $i <= 17; $i++){
$matrixSize = pow(2, $i); $matrixSize = pow(2, $i);
$tileMatrixSet[] = array( $tileMatrixSet[] = array(
'extent' => $extent, 'extent' => $extent,
@@ -988,6 +991,7 @@ class Wmts extends Server {
<Contents>'; <Contents>';
$customtileMatrixSets = ''; $customtileMatrixSets = '';
$maxMercatorZoom = 18;
//layers //layers
foreach ($layers as $m) { foreach ($layers as $m) {
@@ -1011,7 +1015,7 @@ class Wmts extends Server {
); );
} else { } else {
$tileMatrixSet = 'GoogleMapsCompatible'; $tileMatrixSet = 'GoogleMapsCompatible';
$maxMercatorZoom = max(18, $maxMercatorZoom, $m['maxzoom']); $maxMercatorZoom = max($maxMercatorZoom, $m['maxzoom']);
} }
$wmtsHost = substr($m['tiles'][0], 0, strpos($m['tiles'][0], $m['basename'])); $wmtsHost = substr($m['tiles'][0], 0, strpos($m['tiles'][0], $m['basename']));