mirror of
https://github.com/klokantech/tileserver-php.git
synced 2025-08-17 20:01:34 +02:00
Get config from docker volumes if is provided
This commit is contained in:
@@ -62,7 +62,10 @@ class Server {
|
|||||||
* Set config
|
* Set config
|
||||||
*/
|
*/
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
$this->config = $GLOBALS['config'];
|
//Get config from docker volumes
|
||||||
|
$envConfig = $_ENV['config'] == null ? array() : $_ENV['config'];
|
||||||
|
|
||||||
|
$this->config = array_merge($GLOBALS['config'], $envConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1000,14 +1003,14 @@ class Wmts extends Server {
|
|||||||
list( $maxx, $maxy ) = $mercator->LatLonToMeters($bounds[3], $bounds[2]);
|
list( $maxx, $maxy ) = $mercator->LatLonToMeters($bounds[3], $bounds[2]);
|
||||||
$bounds3857 = array($minx, $miny, $maxx, $maxy);
|
$bounds3857 = array($minx, $miny, $maxx, $maxy);
|
||||||
}
|
}
|
||||||
|
|
||||||
$wmtsHost = substr($m['tiles'][0], 0, strpos($m['tiles'][0], $m['basename']));
|
$wmtsHost = substr($m['tiles'][0], 0, strpos($m['tiles'][0], $m['basename']));
|
||||||
$resourceUrlTemplate = $wmtsHost . 'wmts/' . $basename
|
$resourceUrlTemplate = $wmtsHost . 'wmts/' . $basename
|
||||||
. '/{TileMatrixSet}/{TileMatrix}/{TileCol}/{TileRow}';
|
. '/{TileMatrixSet}/{TileMatrix}/{TileCol}/{TileRow}';
|
||||||
if(strlen($format) <= 4){
|
if(strlen($format) <= 4){
|
||||||
$resourceUrlTemplate .= '.' . $format;
|
$resourceUrlTemplate .= '.' . $format;
|
||||||
}
|
}
|
||||||
|
|
||||||
echo'
|
echo'
|
||||||
<Layer>
|
<Layer>
|
||||||
<ows:Title>' . $title . '</ows:Title>
|
<ows:Title>' . $title . '</ows:Title>
|
||||||
|
Reference in New Issue
Block a user