Closed karigarweb closed 6 years ago
Good catch. This was not tested with tms: true
L.TileLayers, so I missed that.
I'll see what I can do...
On getY, following code can convert to TMS based tile number:
y = Math.pow(2, z) - y - 1;
Than swap t1_y & t2_y as the values are going to be inverse.
@karigarweb Could you please check out the issue25-tms
branch and give it a try? It looks good to me, but I'm away from my work computer for a few days so can't test it thoroughly.
The patch specifically is here: https://github.com/gregallensworth/L.TileLayer.Cordova/blob/a87c01ea160ebd34c6ecd12bf1d88ee5aa70cd5e/src/leaflet-tilelayer-cordova.js#L175-L184
@karigarweb Did you get to check out the issue25-tms
version, to confirm that it's working?
Yes, everything is working like a charm! Thank you
As TMS standard force y value to be caculated in negative, this plugin is producing wrong tile number for y axis.