Open kjkrum opened 7 years ago
I noticed that it does the same thing with TileJson responses. Requesting http://localhost/maps2/L286.json
produces the following. Note the incorrect basename
and URLs.
{
"name":"L286",
"description":"",
"legend":"",
"attribution":"",
"type":"overlay",
"version":"1",
"format":"png",
"format_arguments":"-f png8a ",
"minzoom":12,
"maxzoom":16,
"bounds":[
-111.030459,
32.158406,
-110.949883,
32.226733
],
"scale":"1.000000",
"profile":"mercator",
"scheme":"xyz",
"generator":"MapTiler Free 7.2-5b8af5a",
"basename":"L286-2",
"tiles":[
"http://localhost/maps2/L286-2/{z}/{x}/{y}.png"
],
"tilejson":"2.0.0",
"grids":[
"http://localhost/maps2/L286-2/{z}/{x}/{y}.grid.json"
]
}
TMS responses seem to select the map by title rather than path or file name. I think this is a bug.
What I did:
In my first test installation, I happened to use two .mbtiles files that had the same title (
L286
) but different file names (L286.mbtiles
andL286-2.mbtiles
). The URLhttp://localhost/maps2/tms
produces this response, which I think is correct:However, the URLs for both
TileMap
elements produce this response:Note that the
tilemapservice
attribute refers toL286-2
in both cases. I think that when the tileserver handles a request forhttp://localhost/maps2/tms/L286
, it's looking for the first map with a title that matchesL286
, and returning a response for the fileL286-2
because it just happens to be first one with a matching title. It should be treatingL286
as a path or file name, not a title.