Exemplo n.º 1
0
    function GetParameters()
    {
        global $sessionID, $mapName, $printDpi, $rotation, $printSize, $printSize_pixel, $captureBox, $scaleDenominator, $normalizedCapture, $drawNorthArrow;
        $args = $_GET;
        if ($_SERVER["REQUEST_METHOD"] == "POST")
        {
            $args = $_POST;
        }
        
        // Not necessary to validate the parameters    	
        $sessionID   = $args["session_id"];
        $mapName     = $args["map_name"];
        $rotation    = ParseLocaleDouble($args["rotation"]);
        $printDpi    = intval($args["print_dpi"]);

        $scaleDenominator = intval($args["scale_denominator"]);

        $drawNorthArrow = array_key_exists("northarrow", $args) && 
                         (strcmp($args["northarrow"], "1") == 0 ||
                          strcmp($args["northarrow"], "true") == 0);
                    
        
        $array       = explode(",", $args["print_size"]);
        $printSize   = new Size(ParseLocaleDouble($array[0]), ParseLocaleDouble($array[1]));
        $printSize_pixel   = new Size($printSize->width / 25.4 * $printDpi, $printSize->height / 25.4 * $printDpi);
        $array       = explode(",", $args["box"]);
        $captureBox  = CreatePolygon($array);
        
        $array       = explode(",", $args["normalized_box"]);
        $normalizedCapture = CreatePolygon($array);
    }
Exemplo n.º 2
0
function GetParameters()
{
    global $sessionID, $mapName, $printDpi, $rotation, $paperSize, $captureBox, $printSize, $scaleDenominator, $normalizedCapture;
    $args = $_GET;
    if ($_SERVER["REQUEST_METHOD"] == "POST") {
        $args = $_POST;
    }
    // Not necessary to validate the parameters
    $sessionID = $args["session_id"];
    $mapName = $args["map_name"];
    $rotation = ParseLocaleDouble($args["rotation"]);
    $printDpi = intval($args["print_dpi"]);
    $scaleDenominator = intval($args["scale_denominator"]);
    $array = explode(",", $args["paper_size"]);
    $paperSize = new Size(ParseLocaleDouble($array[0]), ParseLocaleDouble($array[1]));
    $printSize = new Size($paperSize->width / 25.4 * $printDpi, $paperSize->height / 25.4 * $printDpi);
    $array = explode(",", $args["box"]);
    $captureBox = CreatePolygon($array);
    $array = explode(",", $args["normalized_box"]);
    $normalizedCapture = CreatePolygon($array);
}