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() {
<?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; }