Exemple #1
0
        } else {
            if (strcmp($args["REDLINEFORMAT"], "SQLite") == 0) {
                $defaultFormat = $args["REDLINEFORMAT"];
                $defaultGeomType = $args["REDLINEGEOMTYPE"];
            }
        }
    }
}
SetLocalizedFilesPath(GetLocalizationPath());
if (isset($_REQUEST['LOCALE'])) {
    $locale = $_REQUEST['LOCALE'];
} else {
    $locale = GetDefaultLocale();
}
try {
    $markupEditor = new MarkupEditor($args);
    if (array_key_exists('EDITCOMMAND', $args)) {
        $cmd = $args['EDITCOMMAND'];
        switch ($cmd) {
            case EditCommand::AddPoint:
                $markupEditor->AddPoint();
                $refreshMap = true;
                break;
            case EditCommand::AddLine:
            case EditCommand::AddLineString:
                $markupEditor->AddLineString();
                $refreshMap = true;
                break;
            case EditCommand::AddCircle:
            case EditCommand::AddRectangle:
            case EditCommand::AddPolygon:
Exemple #2
0
        } else if (strcmp($args["REDLINEFORMAT"], "SQLite") == 0) {
            $defaultFormat = $args["REDLINEFORMAT"];
            $defaultGeomType = $args["REDLINEGEOMTYPE"];
        }
    }

    SetLocalizedFilesPath(GetLocalizationPath());
    if(isset($_REQUEST['LOCALE'])) {
        $locale = $_REQUEST['LOCALE'];
    } else {
        $locale = GetDefaultLocale();
    }

    try
    {
        $markupEditor = new MarkupEditor($args);
        if (array_key_exists('EDITCOMMAND', $args))
        {
            $cmd = $args['EDITCOMMAND'];
            switch ($cmd) {
            case EditCommand::AddPoint:
                $markupEditor->AddPoint();
                $refreshMap = true;
                break;
            case EditCommand::AddLine:
            case EditCommand::AddLineString:
                $markupEditor->AddLineString();
                $refreshMap = true;
                break;
            case EditCommand::AddCircle:
            case EditCommand::AddRectangle:
Exemple #3
0
 function UpdateMarkup()
 {
     $featureService = $this->site->CreateService(MgServiceType::FeatureService);
     $featureSourceId = $this->GetFeatureSource();
     //HACK: Another leaky abstraction. SHP will always choose FeatId, so once again
     //use the class definition to determine the identity property name
     $clsDef = $this->GetClassDefinition();
     $idProps = $clsDef->GetIdentityProperties();
     $keyProp = $idProps->GetItem(0);
     $idName = $keyProp->GetName();
     $propertyValues = new MgPropertyCollection();
     $propertyValues->Add(new MgStringProperty('Text', trim($this->args['UPDATETEXT'])));
     $commands = new MgFeatureCommandCollection();
     $commands->Add(new MgUpdateFeatures('Markup', $propertyValues, $this->BuildFeatureFilter($idName)));
     $result = $featureService->UpdateFeatures($featureSourceId, $commands, false);
     MarkupEditor::CleanupReaders($result);
 }
Exemple #4
0
<?php

$fusionMGpath = '../../layers/MapGuide/php/';
require_once $fusionMGpath . 'Common.php';
require_once 'classes/markupeditor.php';
$args = $_SERVER['REQUEST_METHOD'] == "POST" ? $_POST : $_GET;
$markupEditor = new MarkupEditor($args);
header('Content-Type: text/xml');
echo $markupEditor->GetSelectionXML();