1

When I see some MapServer I usually get deeper and checking how it was done. Recently I found on one server where is avalanche map strange tms url. I haven't seen it before but probably some of you guys will tell me what is this type. I know that 14 is zoom and rest is unknown for me. So if you know what is this tms url type, i will be thankful.

Before visiting this link you have to visit http://mapy.hiking.sk/?zoom=14&lat=6305837.94292&lon=2194989.75612&layers=00BFTTTTTTFFFFFTT to get cookies otherwise, this url below will not load.

https://mapy.hiking.sk/layers/laviny/14/000/009/088/000/010/772.png

enter image description here

  • That URL doesnt work for me, and if I go to mapy.hiking.sk I get a google layer by default - there's some other base layers but my Slovak is a bit non-existent. – Spacedman Feb 12 '18 at 12:10
  • Before visiting this link you have to visit mapy.hiking.sk to get cookies otherwise, this url below will not load. Well I am asking if anybody knows what are others numbers in the url. I don`t speak slovak at all :-D – Bjørson Ålmer Feb 12 '18 at 12:14
  • Got it now! I was hoping that if I could see it on a web map I could see several tiles and infer where the X and Y coordinates were in the URL... – Spacedman Feb 12 '18 at 12:20
  • Ok thanks, url is here mapy.hiking.sk/… – Bjørson Ålmer Feb 12 '18 at 12:20
  • It is a bit strange - the 14 is the zoom, the X and Y are encoded in the 088 and 772 in your example, and the other four parts seem fixed for a given zoom level... – Spacedman Feb 12 '18 at 12:33
1

Looking at the JS script creating the map, we can see that the layer is of type OpenLayers.Layer.TileCache. This tile cache software uses a 7 components URL, with 1 for the zoom, 3 for X, and 3 for Y. Each of the 3 X and Y components contains 3 numbers at most, so the tile X = 123 456 789, Y=1, Z=10 will be shown as /layername/10/123/456/789/000/000/1.png

I haven't found an official textual definition of this, but it corresponds to the source code and to several comments.

components = ( self.basedir,
               tile.layer.name,
               "%02d" % tile.z,
               "%03d" % int(tile.x / 1000000),
               "%03d" % (int(tile.x / 1000) % 1000),
               "%03d" % (int(tile.x) % 1000),
               "%03d" % int(tile.y / 1000000),
               "%03d" % (int(tile.y / 1000) % 1000),
               "%03d.%s" % (int(tile.y) % 1000, 
               tile.layer.extension)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.