Support for TMS

659
2
12-29-2020 11:49 AM
MichaelDavis3
Occasional Contributor III

Hi - we are trying to implement a tile Basemap using a TMS endpoint with inverted rows (-y), which is still a common occurrence in many web tile services.  It looks like the URL template in AGSWebTiledLayer does not correctly support inverting the row.

Can this be fixed?

2 Replies
Nicholas-Furness
Esri Regular Contributor

By default it will expect the OSM tiling scheme. But you can create your own AGSTileInfo object with appropriate origin and tile size and construct an AGSWebTiledLayer using that. That would work if all y values were -ve (i.e. the origin is way up north).

I confess I'm not familiar with the TMS spec but a quick scan didn't highlight a way that y would be inverted (south of the tile scheme origin was +ve y, north of the origin was -ve y), but it's entirely possible I missed it. Regardless, if that's the case you can also provide a custom tile request handler that changes the sign of the row, makes the request (potentially using an AGSRequestOperation), and provides the tile data.

Does that work for you?

xavierlhomme
Occasional Contributor

Hello 

  Just have a look on this https://wiki.openstreetmap.org/wiki/TMS#The_Y_coordinate

Best Regards 

Xavier Lhomme
GIS Architect / ESIRI Expert
0 Kudos