code: public static double longitudeToPixelXWithScaleFactor(double longitude, double scaleFactor, int tileSize) {
          long mapSize = getMapSizeWithScaleFactor(scaleFactor, tileSize);
          return (longitude + 180) / 360 * mapSize;
      }
docs: Converts a longitude coordinate (in degrees) to a pixel X coordinate at a certain scale factor.
  
  @param longitude   the longitude coordinate that should be converted.
  @param scaleFactor the scale factor at which the coordinate should be converted.
  @return the pixel X coordinate of the longitude value.