New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TMS with XYZ source #3923
Comments
|
Also you should leave out the origin from the tile grid configuration, or use the top left corner instead of the bottom left one. |
but how would |
Yes, and {-y} in the template causes the -y-1 calculation. The ESRI example uses a tile Url function because there is a z offset. |
none of these work. Here a fiddle:
|
You're right. I just looked at the code and saw that {-y} only works with a standard XYZ tile grid. Any suggestions for documentation improvements? |
if you like, we could add this source to the examples as an example of TMS. It was originally a tilecache layer, but I squashed the directories and renamed the files to make it a TMS pattern. I would just change the url to https as appspot now supports http/2 which should speed up loading of tiles |
That would be a great addition to the examples collection. Thanks in advance! |
Fixed with #3929. |
I have a tile source with a standard z/x/y url pattern, but with bottom-left 0/0, i.e. like TMS. This loads fine using a simple TileImage:
The current docs for XYZ state "Layer source for tile data with URLs in a set XYZ format", which this is, so it ought to work with XYZ too, using the url pattern instead of tileUrlFunction. But it doesn't, whether using y or -y (I suspect the bitwise operator in createFromTemplate is causing the problem here). This is not necessarily a problem, as I can always use TileImage, but if XYZ can't handle some zxy sources, this should be documented.
I also think that the rather confusing area of tile origins needs to be better documented in the api docs, for example, that XYZ and WMTS grids are by default top-left, and that you use
-y
with XYZ for a bottom-left origin.The text was updated successfully, but these errors were encountered: