public long latToPixel(double lat){
  double invCos=1 / Math.cos(Math.toRadians(lat));
  double tan=Math.tan(Math.toRadians(lat));
  double ln=Math.log(tan + invCos);
  return (long)((1 - ln / Math.PI) * Math.pow(2,zoom - 1) * 256);
}

public long latToPixel ( double lat ) { double invCos = 1 / Math . cos ( Math . toRadians ( lat ) ) ; double tan = Math . tan ( Math . toRadians ( lat ) ) ; double ln = Math . log ( tan + invCos ) ; return ( long ) ( ( 1 - ln / Math . PI ) * Math . pow ( 2 , zoom - 1 ) * 256 ) ; }
convert latitude to pixel value
