예제 #1
0
파일: markupmain.php 프로젝트: kanbang/Colt
        }
    }
}
SetLocalizedFilesPath(GetLocalizationPath());
if (isset($_REQUEST['LOCALE'])) {
    $locale = $_REQUEST['LOCALE'];
} else {
    $locale = GetDefaultLocale();
}
try {
    $markupManager = new MarkupManager($args);
    if (array_key_exists('MARKUPCOMMAND', $args)) {
        $cmd = $args['MARKUPCOMMAND'];
        switch ($cmd) {
            case MarkupCommand::EditStyle:
                $markupManager->CreateMarkup();
                $refreshMap = true;
                break;
            case MarkupCommand::Open:
                $markupManager->OpenMarkup();
                $refreshMap = true;
                break;
            case MarkupCommand::Delete:
                $markupManager->DeleteMarkup();
                break;
            case MarkupCommand::Refresh:
                break;
            case MarkupCommand::Close:
                $markupManager->CloseMarkup();
                $refreshMap = true;
                break;
예제 #2
0
     $args["BORDERTHICKNESS"] = DefaultStyle::BORDER_THICKNESS;
     $args["LABELSIZEUNITS"] = DefaultStyle::LABEL_SIZE_UNITS;
     $args["LABELFONTSIZE"] = DefaultStyle::LABEL_FONT_SIZE;
     
     //Omission is considered false, which is the default. If you ever change
     //the default style values, uncomment the matching "true" values
     //$args["LABELBOLD"] = DefaultStyle::LABEL_BOLD;
     //$args["LABELITALIC"] = DefaultStyle::LABEL_ITALIC;
     //$args["LABELUNDERLINE"] = DefaultStyle::LABEL_UNDERLINE;
     
     $args["LABELFORECOLOR"] = DefaultStyle::LABEL_FORE_COLOR;
     $args["LABELBACKCOLOR"] = DefaultStyle::LABEL_BACK_COLOR;
     $args["LABELBACKSTYLE"] = DefaultStyle::LABEL_BACK_STYLE;
     
     $markupManager = new MarkupManager($args);
     $layerDef = $markupManager->CreateMarkup();
     
     $resId = new MgResourceIdentifier($layerDef);
     $layerName = $resId->GetName();
     $markupManager->SetArgument("MARKUPLAYER", $layerDef);
     $markupManager->OpenMarkup();
     $responseJson = "{ success: true, refreshMap: true, layerDefinition: '$layerDef', layerName: '$layerName' }";
 }
 catch (MgException $mge)
 {
     $errorMsg = $mge->GetExceptionMessage();
     $errorDetail = $mge->GetDetails();
     $stackTrace = $mge->GetStackTrace();
     $responseJson = "{success: false, refreshMap: false, message:'$errorMsg\nDetail: $errorDetail\nStack Trace: $stackTrace'}";
 }
 catch (Exception $e)