コード例 #1
0
ファイル: GeneratePicture.php プロジェクト: kanbang/Colt
include $fusionMGpath . 'Utilities.php';
$fusionMGpath = '../../layers/MapGuide/php/';
include $fusionMGpath . 'Common.php';
$sessionID = "";
$mapName = "";
$rotation = 0.0;
$printDpi = 300;
$scaleDenominator = 0;
$captureBox;
$normalizedCapture;
$printSize_pixel;
$printSize;
$drawNorthArrow = false;
try {
    GetParameters();
    GenerateMap($printSize_pixel);
} catch (MgException $e) {
    $msg = "last error";
    $msg .= "\nERROR: " . $e->GetExceptionMessage() . "\n";
    $msg .= $e->GetDetails() . "\n";
    $msg .= $e->GetStackTrace() . "\n";
    RenderTextToImage($msg);
} catch (Exception $ex) {
    $msg = $ex->GetMessage();
    RenderTextToImage($msg);
}
?>

<?php 
function GetParameters()
{
コード例 #2
0
<?php

include 'common.php';
include 'constants.php';
$sessionID = "";
$mapName = "";
$rotation = 0.0;
$printDpi = 300;
$scaleDenominator = 0;
$captureBox;
$normalizedCapture;
$printSize;
$paperSize;
try {
    GetParameters();
    GenerateMap($printSize);
} catch (MgException $e) {
    header("Content-type: text/html");
    echo "ERROR: " . $e->GetExceptionMessage() . "<br>";
    echo $e->GetStackTrace() . "<br>";
}
?>

<?php 
function GetParameters()
{
    global $sessionID, $mapName, $printDpi, $rotation, $paperSize, $captureBox, $printSize, $scaleDenominator, $normalizedCapture;
    $args = $_GET;
    if ($_SERVER["REQUEST_METHOD"] == "POST") {
        $args = $_POST;
    }