$y = isset($_GET['y']) ? intval($_GET['y']) : round($mosaic->image_h / $mosaic->mosaic_factor / 2);
    //get the image index
    $i = intval($_GET['i']);
    $j = intval($_GET['j']);
    //handle the zoom
    $mosaic->zoomIn($i, $j, $x, $y);
}
if (isset($_GET['center'])) {
    //extract x and y click coordinate from imagemap
    $x = isset($_GET['x']) ? intval($_GET['x']) : round($overview->image_w / $mosaic->mosaic_factor / 2);
    $y = isset($_GET['y']) ? intval($_GET['y']) : round($overview->image_h / $mosaic->mosaic_factor / 2);
    //get the image index
    $i = intval($_GET['i']);
    $j = intval($_GET['j']);
    //get click coordinate on overview, use it to centre the main map
    list($intx, $inty) = $overview->getClickCoordinates($i, $j, $x, $y);
    $zoomindex = array_search($overview->pixels_per_km, $overview->scales);
    $scale = $overview->scales[$zoomindex + 1];
    $mosaic->setScale($scale);
    $mosaic->setMosaicFactor(2);
    $mosaic->setCentre($intx, $inty);
}
if (isset($_GET['recenter'])) {
    //extract x and y click coordinate from imagemap
    $x = isset($_GET['x']) ? intval($_GET['x']) : round($overview->image_w / $mosaic->mosaic_factor / 2);
    $y = isset($_GET['y']) ? intval($_GET['y']) : round($overview->image_h / $mosaic->mosaic_factor / 2);
    //get the image index
    $i = intval($_GET['i']);
    $j = intval($_GET['j']);
    //get click coordinate on overview, use it to centre the main map
    list($intx, $inty) = $overview->getClickCoordinates($i, $j, $x, $y);