Skip to main content

Timeline for Add TMS layer to OpenLayers

Current License: CC BY-SA 3.0

15 events
when toggle format what by license comment
Apr 13, 2017 at 12:34 history edited CommunityBot
replaced http://gis.stackexchange.com/ with https://gis.stackexchange.com/
Feb 15, 2014 at 17:19 history bounty ended Stéphane Henriod
Feb 15, 2014 at 15:27 history edited AndreJ CC BY-SA 3.0
added 7001 characters in body
Feb 15, 2014 at 8:19 vote accept Stéphane Henriod
Feb 15, 2014 at 8:19 comment added Stéphane Henriod Ok... in any case, thanks for you help, it nailed it!
Feb 15, 2014 at 8:18 comment added AndreJ Same here, but only with Firefox. Internet Explorer and K-Meleon show the tiles. This must be a security restriction in Firefox.
Feb 15, 2014 at 7:33 comment added Stéphane Henriod Ok, I have modified GDAL2tiles.py, regenerated the tiles (available here: humadat.alwaysdata.net/tms/khorog/tiles_osm )and it works correctly in JOSM without the "y flip". But for some reason it doesn't display in OpenLayers henriod.info/khub2/khub2_new.html (base layer "Khorog high-res") What is weird is that Firebug seems to receive the tiles...
Feb 14, 2014 at 19:08 comment added AndreJ No, Layer.TMS() expects a service like WMS, which you do not have. Openlayers can not handle your tile naming, but leaflet does: gis.stackexchange.com/questions/66986/…
Feb 14, 2014 at 19:05 history edited AndreJ CC BY-SA 3.0
added 633 characters in body
Feb 14, 2014 at 18:53 comment added Stéphane Henriod I see... I would actually be quite happy if I don't have to recreate the tiles... According to what you say, I would assume that using OpenLayers.Layer.TMS() instead of OpenLayers.Layer.OSM() might do the job, because it would use the OGC system instead of the OSM one? But the parameters are obviously different
Feb 14, 2014 at 18:36 history edited AndreJ CC BY-SA 3.0
added 246 characters in body
Feb 14, 2014 at 18:35 comment added AndreJ In JOSM, I have managed to see the tiles at the right place with {-y}, but that syntax is not valid for Openlayers. Maptiler should have a switch to number the tiles correctly (that is OSM-like). I prefer to hack gdal2tiles for it. See my extended answer.
Feb 14, 2014 at 18:04 comment added Stéphane Henriod You can find the structure here: humadat.alwaysdata.net/tms/khorog/tiles I used Maptiler (maptiler.org) to create the tiles. In JOSM, I can display it with humadat.alwaysdata.net/tms/khorog/tiles{zoom}/{x}/{-y}.jpg I think the problem comes from the "y" coordinate: for some reason, I have to use "-y" in JOSM. So with "y" in OpenLayers, incorrect tile names are requested. But I don't get it to work, neither with "${-y}" nor with "-${y}"
Feb 14, 2014 at 17:47 history edited AndreJ CC BY-SA 3.0
deleted 1 characters in body
Feb 14, 2014 at 17:42 history answered AndreJ CC BY-SA 3.0