From 1aeb3bdb8c6c82b627d69f5e0b942d26277288c5 Mon Sep 17 00:00:00 2001 From: Petr Pridal Date: Sun, 12 Aug 2012 23:55:20 +0200 Subject: [PATCH] Fix of the Gaia client - it displays now all layers and correctly load the WGS84 ones too. --- .htaccess | 6 +++++- tileserver-wmts.php | 5 +++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.htaccess b/.htaccess index a49aea1..74f8890 100644 --- a/.htaccess +++ b/.htaccess @@ -20,7 +20,8 @@ RewriteEngine On # Example: http://www.tileserver.com/grandcanyon/10/192/401.png # map /wmts/layer/[ANYTHING]z/x/y.ext -> /layer/z/x/y.ext (WMTS ignoring tilematrixset,style,..) -RewriteRule ^wmts/([\w\d\._-]+)/.*?(\d+)/(\d+)/(\d+)\.(\w+)$ $1/$2/$3/$4.$5 [L] +# BTW This is used only by Gaia which ignores the +RewriteRule ^wmts/([\w\d\._-]+)/.*?(\d+)/(\d+)/(\d+)\.(\w+)$ $1/$2/$4/$3.$5 [L] # Example: http://www.tileserver.com/wmts/grandcanyon/style/tilematrixset/10/192/401.png # map /layer/[ANYTHING]z/x/y.ext -> /layer/z/x/y.ext (WMTS ignoring tilematrix,style,..) @@ -28,6 +29,9 @@ RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([\w\d\._-]+)/.+?(\d+)/(\d+)/(\d+)\.(\w+)$ $1/$2/$3/$4.$5 [L] # Example: http://www.tileserver.com/grandcanyon/style/tilematrixset/10/192/401.png +# rewrite .jpeg -> .jpg +RewriteRule ^(.+).jpeg$ $1.jpg [L] + # MBTiles support at /layer/z/x/y.ext - loads the tile from mbtiles with php # TODO: serve also 404 errors for tiles RewriteRule ^([^\/]+\.mbtiles)\/.*?(\d+)\/(\d+)\/(\d+)\.(\w+)$ tileserver-mbtiles.php?tileset=$1&z=$2&x=$3&y=$4&ext=$5 [L] diff --git a/tileserver-wmts.php b/tileserver-wmts.php index 6ff88a9..4a8125f 100644 --- a/tileserver-wmts.php +++ b/tileserver-wmts.php @@ -89,12 +89,13 @@ foreach ($maps as $m) { - + - +