function getGeocell(lat, lng, resolution) {
  var cell = '';
  var north = 90.0;
  var south = -90.0;
  var east = 180.0;
  var west = -180.0;

  var subcell_lng_span, subcell_lat_span;
  var x, y;
  while(cell.length < resolution + 1) {
    subcell_lng_span = (east - west) / GEOCELL_GRID_SIZE;
    subcell_lat_span = (north - south) / GEOCELL_GRID_SIZE;

    x = Math.min(Math.floor(GEOCELL_GRID_SIZE * (lng - west) / (east - west)), GEOCELL_GRID_SIZE - 1);
    y = Math.min(Math.floor(GEOCELL_GRID_SIZE * (lat - south) / (north - south)),GEOCELL_GRID_SIZE - 1);
    cell += _subdiv_char(x, y);

    south += subcell_lat_span * y;
    north = south + subcell_lat_span;

    west += subcell_lng_span * x;
    east = west + subcell_lng_span;
  }
  return cell;
}
https://code.google.com/p/geomodel/source/browse/trunk/geo/geocell.py#370
@param latLng
@param resolution
@return