tileXToLongitude method

  1. @override
double tileXToLongitude(
  1. int tileX
)
override

Converts a tile X coordinate to the corresponding longitude (western edge).

Returns the longitude of the western (left) edge of the specified tile.

tileX The tile X coordinate to convert Returns the longitude in degrees of the tile's western boundary

Implementation

@override
double tileXToLongitude(int tileX) {
  assert(tileX >= 0);
  // allow one more so that we can find the end of the tile from the left
  assert(tileX <= _maxTileCount, "$tileX > $_maxTileCount of zoomlevel ${scalefactor.zoomlevel}");
  double result = (tileX / _scalefactor.scalefactor * 360 - 180);
  return result;
  //return pixelXToLongitude(tileX * tileSize.toDouble());
}