Location: PHPKode > projects > jjfmapper > jjfmapper/examples/webapp/map.php
<?php
include ('webapp_config.php');
        $lat = isset($_GET['lat'])? $_GET['lat'] :45;
        $lon = isset($_GET['lon'])? $_GET['lon'] :-85;
        $padding = isset($_GET['padding'])? $_GET['padding'] : 5;
        $bgcolor = isset($_GET['bgcolor'])? $_GET['bgcolor'] : '00a';
        $landcolor = isset($_GET['landcolor'])? $_GET['landcolor'] : '0a0';
        $grid = isset($_GET['grid'])? $_GET['grid'] : false;
        $interval = isset($_GET['interval'])? $_GET['interval'] : 5;
        
        $world = isset($_GET['world'])? $_GET['world'] : false;
        $usa = isset($_GET['usa'])? $_GET['usa'] : true;
        $cda = isset($_GET['cda'])? $_GET['cda'] : true;
        $mex = isset($_GET['mex'])? $_GET['mex'] : false;
        
        $cfg =
                '<jjfmapper>'.
                '<output format="png"/>'.
                '<projection lat="'. $lat .'" lon="'. $lon .'" padding="'. $padding .'°"/>'.
                '<layer format="background" color="'. $bgcolor .'"/>'.
                ($world ? ('<layer format="shapefile" file="${geodir}/continent" style="fill" color="'. $landcolor .'"/>') : '' ).        
                ($usa ? ('<layer format="shapefile" file="${geodir}/states" style="fill" color="'. $landcolor .'"/>') : '' ).     
                ($cda ? ('<layer format="shapefile" file="${geodir}/province" style="fill" color="'. $landcolor .'"/>') : '' ).
                ($mex ? ('<layer format="shapefile" file="${geodir}/mexico" style="fill" color="'. $landcolor .'"/>') : '' ).
                ($grid ? '<layer format="grid" interval="'. $interval .'" color="ccc"/>' : '').
                '</jjfmapper>';
        
        include($jjfmapper_install_dir .'jjfmapper-web.php');
        $map = new jjfmapper($cfg);
        $map->run();
?>
Return current item: jjfmapper