$_map->scalebar->label->size = 8.0; $_map->scalebar->units = MapFile\Scalebar::UNITS_KILOMETERS; $_map->scalebar->setColor(0, 0, 0); $_map->scalebar->setOutlineColor(0, 0, 0); $_map->save($_SESSION['mapfile-generator']['mapfile']); } catch (MapFile\Exception $e) { $error = $e->getMessage(); } } } $map = new MapFile\Map($_SESSION['mapfile-generator']['mapfile']); if (isset($_GET['up'])) { $map->moveLayerUp(intval($_GET['up'])); } else { if (isset($_GET['down'])) { $map->moveLayerDown(intval($_GET['down'])); } else { if (isset($_GET['remove'])) { $map->removeLayer(intval($_GET['remove'])); } else { if (isset($_POST['action']) && $_POST['action'] == 'save') { $map->name = trim($_POST['name']); $map->projection = $_POST['projection']; $map->setExtent($_POST['extentminx'], $_POST['extentminy'], $_POST['extentmaxx'], $_POST['extentmaxy']); } } } } $map->save($_SESSION['mapfile-generator']['mapfile']); } if (!isset($error)) {