Beispiel #1
0
         $_map = new MapFile\Map($_GET['map']);
         $_map->save($_SESSION['mapfile-generator']['mapfile']);
     } catch (MapFile\Exception $e) {
         $error = $e->getMessage();
     }
 } else {
     if (!isset($_SESSION['mapfile-generator']['mapfile'])) {
         $mapfile = $tmp . '/mapserver/mapfile-' . uniqid() . '.map';
         $_SESSION['mapfile-generator']['mapfile'] = $mapfile;
         unset($_SESSION['mapfile-generator']['source']);
         try {
             $_map = new MapFile\Map();
             $_map->projection = 'epsg:4326';
             $_map->setExtent(-180, -90, 180, 90);
             $_map->setSize(500, 500);
             $_map->setFontSet($settings['fontset']);
             $_map->setSymbolSet($settings['symbolset']);
             $_map->legend->label->font = $settings['font'];
             $_map->scalebar->label->font = $settings['font'];
             $_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'])) {