public function latLonToTile($lat, $lon, $zoom)
  {
    $ar = $this->LatLonToMeters($lat, $lon);
    $coord = $this->MetersToPixels($ar['xm'], $ar['ym'], $zoom);
    if ($coord['yp'] < $this->tileSize) {
      $coord['yp'] = 0;
    }
    $tile_x = intval($coord['xp'] / $this->tileSize);
    $tile_y = intval($coord['yp'] / $this->tileSize);
    $tile_y = $this->GoogleTileYcoord($tile_y, $zoom);
    return array('x' => $tile_x, 'y' => $tile_y);
  }