For my understanding X direction and y-direction are independent dimensions, e.g. both directions should follow the same mathematics.
Therefore I didn't get why your x-direction is coded diffrently compared to the y-direction (minY and maxY)!?
https://www.b4x.com/android/forum/threads/xui2d-how-is-the-tilemap-drawn.97652/