fixed a bug with TileLayer with non-quadratic map-sizes