pixelXToLongitude method

double pixelXToLongitude(
  1. double pixelX
)

Converts a pixel X coordinate at a certain map size to a longitude coordinate.

@param pixelX the pixel X coordinate that should be converted. @param mapSize precomputed size of map. @return the longitude value of the pixel X coordinate. @throws IllegalArgumentException if the given pixelX coordinate is invalid.

Implementation

double pixelXToLongitude(double pixelX) {
  assert(pixelX >= 0);
  assert(pixelX <= _mapSize);
  return 360 * ((pixelX / _mapSize) - 0.5);
}