code: public static double longitudeToPixelX(double longitude, byte zoomLevel, int tileSize) {
          long mapSize = getMapSize(zoomLevel, tileSize);
          return (longitude + 180) / 360 * mapSize;
      }
docs: Converts a longitude coordinate (in degrees) to a pixel X coordinate at a certain zoom level.
  
  @param longitude the longitude coordinate that should be converted.
  @param zoomLevel the zoom level at which the coordinate should be converted.
  @param tileSize  the tile size
  @return the pixel X coordinate of the longitude value.