pixelYToTileY method

int pixelYToTileY(
  1. double pixelY
)

Converts a pixel Y coordinate to the tile Y number.

@param pixelY the pixel Y coordinate that should be converted. @param zoomLevel the zoom level at which the coordinate should be converted. @return the tile Y number.

Implementation

int pixelYToTileY(double pixelY) {
  assert(pixelY >= 0);
  assert(pixelY <= _mapSize);
  return min(pixelY / tileSize, scalefactor.scalefactor - 1).floor();
}