mirror of
https://github.com/klokantech/tileserver-php.git
synced 2025-01-17 06:08:17 +01:00
Modified WMTS Resource URL generation to support hostnames that contain the layer name.
If the hostname contained the layer name (eg. https://layername.domain.com/layername/wmts) then the WMTS capabilities document contained an incorrect Resource URL because the hostname was stripped back to simply https://. This modification simply looks for the last occurrence of the layer name instead of the first when forming the Resource URL.
This commit is contained in:
parent
eb571b5d70
commit
7800af830a
@ -1031,7 +1031,7 @@ class Wmts extends Server {
|
||||
$maxMercatorZoom = max($maxMercatorZoom, $m['maxzoom']);
|
||||
}
|
||||
|
||||
$wmtsHost = substr($m['tiles'][0], 0, strpos($m['tiles'][0], $m['basename']));
|
||||
$wmtsHost = substr($m['tiles'][0], 0, strrpos($m['tiles'][0], $m['basename']));
|
||||
$resourceUrlTemplate = $wmtsHost . $basename
|
||||
. '/{TileMatrix}/{TileCol}/{TileRow}';
|
||||
if(strlen($format) <= 4){
|
||||
|
Loading…
x
Reference in New Issue
Block a user