I did wrote a tileproviderfor b4a to use tiles generated by a Python Script.
IN: int x, int y, int Zoom
to match the tilenames with the y value, i needed to use this code to transform y
The Solution was to use this code (i found somewhere in the internet: don´t know what exactly it is doing but it was the solution.
Java-Code
For the tileprovider this was ok.
Now i´m in the need to do the Opposite. I have X, Zoom and the reversedY and i need Y.
Can anybody help me in this?
Ideally i would prefer to get a B4J Solution as i need to use it in B4J.
IN: int x, int y, int Zoom
to match the tilenames with the y value, i needed to use this code to transform y
The Solution was to use this code (i found somewhere in the internet: don´t know what exactly it is doing but it was the solution.
Java-Code
B4X:
int reversedY = (1 << zoom) - y - 1;
For the tileprovider this was ok.
Now i´m in the need to do the Opposite. I have X, Zoom and the reversedY and i need Y.
Can anybody help me in this?
Ideally i would prefer to get a B4J Solution as i need to use it in B4J.