[fusion-commits] r2502 - in trunk: text widgets widgets/Redline widgets/Redline/classes widgets/widgetinfo

svn_fusion at osgeo.org svn_fusion at osgeo.org
Tue Jan 3 12:15:25 EST 2012


Author: jng
Date: 2012-01-03 09:15:24 -0800 (Tue, 03 Jan 2012)
New Revision: 2502

Added:
   trunk/widgets/Redline/classes/defaultstyle.php
   trunk/widgets/Redline/editmarkupstyle.php
Modified:
   trunk/text/en
   trunk/widgets/Redline.js
   trunk/widgets/Redline/classes/markupcommand.php
   trunk/widgets/Redline/classes/markupmanager.php
   trunk/widgets/Redline/editmarkup.php
   trunk/widgets/Redline/markupmain.php
   trunk/widgets/Redline/newmarkup.php
   trunk/widgets/widgetinfo/redline.xml
Log:
#508: Improve redline widget usability (first part):
 - When clicking "New", a new redline layer with a default style is added to the map and the user is directed to the edit redlines page. It is no longer mandatory for the user to specify the layer style for these redlines, the user can always edit the styles later.
 - The existing New Redline UI page has been repurposed as a Edit Redline Style page, which the user can get to with a new "Edit Styles" button. Clicking this button will bring up this page initialized with the styles for the selected layer, ready for editing. Changes are applied and take effect immediately when saved. The layer name is no longer editable as this complicates the redline management.
 - Add a new widget extension property PromptForRedlineLabels, which determines if recorded redlines will prompt the user for label input.
 - Update MarkupManager to allow for layer definition creation *and* updating.


Modified: trunk/text/en
===================================================================
--- trunk/text/en	2011-12-30 10:04:12 UTC (rev 2501)
+++ trunk/text/en	2012-01-03 17:15:24 UTC (rev 2502)
@@ -223,9 +223,12 @@
 REDLINEEDIT             = Add/Edit Redlines
 REDLINEREMOVEFROMMAP    = Remove From Map
 REDLINEDOWNLOADSDF      = Download
+REDLINEUPLOADSDF        = Upload
+REDLINEEDITSTYLE        = Edit Style
+REDLINECREATEFAILURE    = Failed to create redline
 
-# New Redline UI
-REDLINENEWLAYER         = New Redline Layer
+# Edit Redline Style UI
+REDLINEEDITLAYERSTYLE   = Edit Redline Style
 REDLINELAYERSETTINGS    = Redline Layer Settings
 REDLINENAME             = Redline Name:
 REDLINEPOINTSTYLE       = Point Style

Added: trunk/widgets/Redline/classes/defaultstyle.php
===================================================================
--- trunk/widgets/Redline/classes/defaultstyle.php	                        (rev 0)
+++ trunk/widgets/Redline/classes/defaultstyle.php	2012-01-03 17:15:24 UTC (rev 2502)
@@ -0,0 +1,98 @@
+<?php
+
+//A layer style that represents all the pluggable %s tokens from markuplayerdefinition.xml
+//A new instance for this class is initialized with the default values from DefaultStyle
+class LayerStyle
+{
+    public $MARKER_COLOR;
+    public $MARKER_TYPE;
+    public $MARKER_SIZE_UNITS;
+    public $MARKER_SIZE;
+    public $LINE_COLOR;
+    public $LINE_PATTERN;
+    public $LINE_SIZE_UNITS;
+    public $LINE_THICKNESS;
+    public $FILL_PATTERN;
+    public $FILL_TRANSPARENCY;
+    public $FILL_FORE_COLOR;
+    public $FILL_BACK_COLOR;
+    public $FILL_BACK_TRANS;
+    public $BORDER_PATTERN;
+    public $BORDER_SIZE_UNITS;
+    public $BORDER_COLOR;
+    public $BORDER_THICKNESS;
+    public $LABEL_SIZE_UNITS;
+    public $LABEL_FONT_SIZE;
+    public $LABEL_BOLD;
+    public $LABEL_ITALIC;
+    public $LABEL_UNDERLINE;
+    public $LABEL_FORE_COLOR;
+    public $LABEL_BACK_COLOR;
+    public $LABEL_BACK_STYLE;
+    
+    public function __construct() {
+        $this->MARKER_COLOR = DefaultStyle::MARKER_COLOR;
+        $this->MARKER_TYPE = DefaultStyle::MARKER_TYPE;
+        $this->MARKER_SIZE_UNITS = DefaultStyle::MARKER_SIZE_UNITS;
+        $this->MARKER_SIZE = DefaultStyle::MARKER_SIZE;
+        $this->LINE_COLOR = DefaultStyle::LINE_COLOR;
+        $this->LINE_PATTERN = DefaultStyle::LINE_PATTERN;
+        $this->LINE_SIZE_UNITS = DefaultStyle::LINE_SIZE_UNITS;
+        $this->LINE_THICKNESS = DefaultStyle::LINE_THICKNESS;
+        $this->FILL_PATTERN = DefaultStyle::FILL_PATTERN;
+        $this->FILL_TRANSPARENCY = DefaultStyle::FILL_TRANSPARENCY;
+        $this->FILL_FORE_COLOR = DefaultStyle::FILL_FORE_COLOR;
+        $this->FILL_BACK_COLOR = DefaultStyle::FILL_BACK_COLOR;
+        $this->FILL_BACK_TRANS = DefaultStyle::FILL_BACK_TRANS;
+        $this->BORDER_PATTERN = DefaultStyle::BORDER_PATTERN;
+        $this->BORDER_SIZE_UNITS = DefaultStyle::BORDER_SIZE_UNITS;
+        $this->BORDER_COLOR = DefaultStyle::BORDER_COLOR;
+        $this->BORDER_THICKNESS = DefaultStyle::BORDER_THICKNESS;
+        $this->LABEL_SIZE_UNITS = DefaultStyle::LABEL_SIZE_UNITS;
+        $this->LABEL_FONT_SIZE = DefaultStyle::LABEL_FONT_SIZE;
+        $this->LABEL_BOLD = DefaultStyle::LABEL_BOLD;
+        $this->LABEL_ITALIC = DefaultStyle::LABEL_ITALIC;
+        $this->LABEL_UNDERLINE = DefaultStyle::LABEL_UNDERLINE;
+        $this->LABEL_FORE_COLOR = DefaultStyle::LABEL_FORE_COLOR;
+        $this->LABEL_BACK_COLOR = DefaultStyle::LABEL_BACK_COLOR;
+        $this->LABEL_BACK_STYLE = DefaultStyle::LABEL_BACK_STYLE;
+    }
+}
+
+//Default markup layer settings
+class DefaultStyle
+{
+    const MARKER_COLOR = "FF0000";
+    const MARKER_TYPE = "Square";
+    const MARKER_SIZE_UNITS = "Points";
+    const MARKER_SIZE = 10;
+    
+    const LINE_COLOR = "0000FF";
+    const LINE_PATTERN = "Solid";
+    const LINE_SIZE_UNITS = "Centimeters";
+    const LINE_THICKNESS = 0;
+    
+    const FILL_PATTERN = "Solid";
+    const FILL_TRANSPARENCY = 0;
+    const FILL_FORE_COLOR = "00FF00";
+    const FILL_BACK_COLOR = "00FF00";
+    const FILL_BACK_TRANS = true;
+    
+    const BORDER_PATTERN = "Solid";
+    const BORDER_SIZE_UNITS = "Centimeters";
+    const BORDER_COLOR = "000000";
+    const BORDER_THICKNESS = 0;
+    
+    const LABEL_SIZE_UNITS = "Points";
+    const LABEL_FONT_SIZE = 10;
+    
+    const LABEL_BOLD = false;
+    const LABEL_ITALIC = false;
+    const LABEL_UNDERLINE = false;
+    
+    const LABEL_FORE_COLOR = "000000";
+    const LABEL_BACK_COLOR = "FFFFFF";
+    const LABEL_BACK_STYLE = "Ghosted";
+}
+
+?>
\ No newline at end of file

Modified: trunk/widgets/Redline/classes/markupcommand.php
===================================================================
--- trunk/widgets/Redline/classes/markupcommand.php	2011-12-30 10:04:12 UTC (rev 2501)
+++ trunk/widgets/Redline/classes/markupcommand.php	2012-01-03 17:15:24 UTC (rev 2502)
@@ -9,6 +9,8 @@
 	const Edit		= 5;
 	const Close		= 6;
     const Download  = 7;
+    const Upload = 8;
+    const EditStyle = 9;
 }
 
 ?>
\ No newline at end of file

Modified: trunk/widgets/Redline/classes/markupmanager.php
===================================================================
--- trunk/widgets/Redline/classes/markupmanager.php	2011-12-30 10:04:12 UTC (rev 2501)
+++ trunk/widgets/Redline/classes/markupmanager.php	2012-01-03 17:15:24 UTC (rev 2502)
@@ -19,6 +19,11 @@
         $this->InitMarkupRegistry();
 	}
     
+    function SetArgument($arg, $value)
+    {
+        $this->args[$arg] = $value;
+    }
+    
     function InitMarkupRegistry()
     {
         //NOTE: EnumerateResources does not work for session repositories. So to be able to "enumerate"
@@ -79,6 +84,22 @@
     {
         return "Session:" . $this->args["SESSION"] . "//";
     }
+    
+    function GetFeatureSource($layerDefinitionId)
+    {
+        $featureService = $this->site->CreateService(MgServiceType::FeatureService);
+        $query = new MgFeatureQueryOptions();
+        $query->SetFilter("LayerDefinition = '$layerDefinitionId'");
+        $fr = $featureService->SelectFeatures($this->markupRegistryId, "Default:MarkupRegistry", $query);
+        
+        $fsId = "";
+        if($fr->ReadNext())
+        {
+            $fsId = $fr->GetString("ResourceId");
+        }
+        $fr->Close();
+        return $fsId;
+    }
 
 	function GetAvailableMarkup()
 	{
@@ -124,6 +145,100 @@
 		
 		return $markup;
 	}
+    
+    function StripAlphaFromColorString($str) {
+        return substr($str, 2, strlen($str) - 2);
+    }
+    
+    function GetLayerStyle($layerDef)
+    {
+        $style = new LayerStyle();
+        $resId = new MgResourceIdentifier($layerDef);
+        $resourceService = $this->site->CreateService(MgServiceType::ResourceService);
+        $br = $resourceService->GetResourceContent($resId);
+        
+        $doc = DOMDocument::LoadXML($br->ToString());
+        $vsr = $doc->getElementsByTagName("VectorScaleRange")->item(0);
+        
+        $pts = $vsr->getElementsByTagName("PointTypeStyle");
+        $ats = $vsr->getElementsByTagName("AreaTypeStyle");
+        $lts = $vsr->getElementsByTagName("LineTypeStyle");
+        
+        if ($pts->length > 0) {
+            $pr = $pts->item(0);
+            $prLabel = $pr->getElementsByTagName("Label")->item(0);
+            $prMark = $pr->getElementsByTagName("PointSymbolization2D")->item(0)->getElementsByTagName("Mark")->item(0);
+            
+            $style->LABEL_SIZE_UNITS = $prLabel->getElementsByTagName("Unit")->item(0)->nodeValue;
+            $style->LABEL_FONT_SIZE = $prLabel->getElementsByTagName("SizeX")->item(0)->nodeValue;
+            $style->LABEL_FORE_COLOR = $this->StripAlphaFromColorString($prLabel->getElementsByTagName("ForegroundColor")->item(0)->nodeValue);
+            $style->LABEL_BACK_COLOR = $this->StripAlphaFromColorString($prLabel->getElementsByTagName("BackgroundColor")->item(0)->nodeValue);
+            $style->LABEL_BACK_STYLE = $prLabel->getElementsByTagName("BackgroundStyle")->item(0)->nodeValue;
+            $style->LABEL_BOLD = $prLabel->getElementsByTagName("Bold")->item(0)->nodeValue;
+            $style->LABEL_ITALIC = $prLabel->getElementsByTagName("Italic")->item(0)->nodeValue;
+            $style->LABEL_UNDERLINE = $prLabel->getElementsByTagName("Underlined")->item(0)->nodeValue;
+            
+            $style->MARKER_SIZE_UNITS = $prMark->getElementsByTagName("Unit")->item(0)->nodeValue;
+            $style->MARKER_SIZE = $prMark->getElementsByTagName("SizeX")->item(0)->nodeValue;
+            $style->MARKER_TYPE = $prMark->getElementsByTagName("Shape")->item(0)->nodeValue;
+            
+            $style->MARKER_COLOR = $this->StripAlphaFromColorString($prMark->getElementsByTagName("ForegroundColor")->item(0)->nodeValue);
+            //$style->MARKER_COLOR = $this->StripAlphaFromColorString($prMark->item(7)->childNodes->item(2)->nodeValue);
+        }
+        if ($lts->length > 0) {
+            $lr = $lts->item(0);
+            $lrLabel = $lr->getElementsByTagName("Label")->item(0);
+            $lrSym = $lr->getElementsByTagName("LineSymbolization2D")->item(0);
+            
+            $style->LABEL_SIZE_UNITS = $lrLabel->getElementsByTagName("Unit")->item(0)->nodeValue;
+            $style->LABEL_FONT_SIZE = $lrLabel->getElementsByTagName("SizeX")->item(0)->nodeValue;
+            $style->LABEL_FORE_COLOR = $this->StripAlphaFromColorString($lrLabel->getElementsByTagName("ForegroundColor")->item(0)->nodeValue);
+            $style->LABEL_BACK_COLOR = $this->StripAlphaFromColorString($lrLabel->getElementsByTagName("BackgroundColor")->item(0)->nodeValue);
+            $style->LABEL_BACK_STYLE = $lrLabel->getElementsByTagName("BackgroundStyle")->item(0)->nodeValue;
+     
+            if ($pts->length == 0) {
+                $style->LABEL_BOLD = $lrLabel->getElementsByTagName("Bold")->item(0)->nodeValue;
+                $style->LABEL_ITALIC = $lrLabel->getElementsByTagName("Italic")->item(0)->nodeValue;
+                $style->LABEL_UNDERLINE = $lrLabel->getElementsByTagName("Underlined")->item(0)->nodeValue;
+            }
+            
+            $style->LINE_PATTERN = $lrSym->getElementsByTagName("LineStyle")->item(0)->nodeValue;
+            $style->LINE_THICKNESS = $lrSym->getElementsByTagName("Thickness")->item(0)->nodeValue;
+            $style->LINE_COLOR = $this->StripAlphaFromColorString($lrSym->getElementsByTagName("Color")->item(0)->nodeValue);
+            $style->LINE_SIZE_UNITS = $lrSym->getElementsByTagName("Unit")->item(0)->nodeValue;
+        }
+        if ($ats->length > 0) {
+            $ar = $ats->item(0);
+            $arLabel = $ar->getElementsByTagName("Label")->item(0);
+            $arSym = $ar->getElementsByTagName("AreaSymbolization2D")->item(0);
+            
+            $style->LABEL_SIZE_UNITS = $arLabel->getElementsByTagName("Unit")->item(0)->nodeValue;
+            $style->LABEL_FONT_SIZE = $arLabel->getElementsByTagName("SizeX")->item(0)->nodeValue;
+            $style->LABEL_FORE_COLOR = $this->StripAlphaFromColorString($arLabel->getElementsByTagName("ForegroundColor")->item(0)->nodeValue);
+            $style->LABEL_BACK_COLOR = $this->StripAlphaFromColorString($arLabel->getElementsByTagName("BackgroundColor")->item(0)->nodeValue);
+            $style->LABEL_BACK_STYLE = $arLabel->getElementsByTagName("BackgroundStyle")->item(0)->nodeValue;
+            
+            if ($pts->length == 0 && $lts->length == 0)
+            {
+                $style->LABEL_BOLD = $arLabel->getElementsByTagName("Bold")->item(0)->nodeValue;
+                $style->LABEL_ITALIC = $arLabel->getElementsByTagName("Italic")->item(0)->nodeValue;
+                $style->LABEL_UNDERLINE = $arLabel->getElementsByTagName("Underlined")->item(0)->nodeValue;
+            }
+            
+            $arSymFill = $arSym->getElementsByTagName("Fill")->item(0);
+            $arSymStroke = $arSym->getElementsByTagName("Stroke")->item(0);
+            
+            $style->FILL_PATTERN = $arSymFill->getElementsByTagName("FillPattern")->item(0)->nodeValue;
+            $style->FILL_FORE_COLOR = $this->StripAlphaFromColorString($arSymFill->getElementsByTagName("ForegroundColor")->item(0)->nodeValue);
+            $style->FILL_BACK_COLOR = $this->StripAlphaFromColorString($arSymFill->getElementsByTagName("BackgroundColor")->item(0)->nodeValue);
+            
+            $style->BORDER_PATTERN = $arSymStroke->getElementsByTagName("LineStyle")->item(0)->nodeValue;
+            $style->BORDER_THICKNESS = $arSymStroke->getElementsByTagName("Thickness")->item(0)->nodeValue;
+            $style->BORDER_COLOR = $this->StripAlphaFromColorString($arSymStroke->getElementsByTagName("Color")->item(0)->nodeValue);
+            $style->BORDER_SIZE_UNITS = $arSymStroke->getElementsByTagName("Unit")->item(0)->nodeValue;
+        }
+        return $style;
+    }
 		
 	function OpenMarkup()
 	{
@@ -153,8 +268,8 @@
 		
 		$markupLayerResId = new MgResourceIdentifier($this->args['MARKUPLAYER']);
 		$markupLayer = new MgLayer($markupLayerResId, $resourceService);
-		$markupLayer->SetName('_' . $markupLayerResId->GetName());
-		$markupLayer->SetLegendLabel($markupLayerResId->GetName());
+        $markupLayer->SetName('_' . $markupLayerResId->GetName());
+        $markupLayer->SetLegendLabel($markupLayerResId->GetName());
 		$markupLayer->SetDisplayInLegend(true);
 		$markupLayer->SetSelectable(true);
 		$markupLayer->SetGroup($markupGroup);
@@ -192,10 +307,10 @@
 			}
 		}
 	}
-	
+    
 	function CreateMarkup()
 	{
-		$markupName = $this->args['MARKUPNAME'];
+        $markupName = "RedlineLayer";
 		$this->UniqueMarkupName($markupName);
 		
 		$resourceService = $this->site->CreateService(MgServiceType::ResourceService);
@@ -204,16 +319,25 @@
         $map = new MgMap();
 		$map->Open($resourceService, $this->args['MAPNAME']);
 
-		// Create the Markup Feature Source (SDF)
+        $featureSourceId = "";
+        $bUpdate = array_key_exists("EDITMARKUPLAYER", $this->args) && array_key_exists("MARKUPLAYERNAME", $this->args) && array_key_exists("EDITFEATURESOURCE", $this->args);
+        
+		// Create the Markup Feature Source (SDF) if not updating
+        if (!$bUpdate)
+        {
+            $markupSdfResId = new MgResourceIdentifier($this->GetResourceIdPrefix() . $markupName . '.FeatureSource');
+            
+            $markupSchema = MarkupSchemaFactory::CreateMarkupSchema();
+            $sdfParams = new MgCreateSdfParams('Default', $map->GetMapSRS(), $markupSchema);
+            $featureService->CreateFeatureSource($markupSdfResId, $sdfParams);
+            $featureSourceId = $markupSdfResId->ToString();
+        }
+        else 
+        {
+            $featureSourceId = $this->args["EDITFEATURESOURCE"];
+        }
+		// Create the Markup Layer Definition. Create or update, this code is the same.
 
-		$markupSdfResId = new MgResourceIdentifier($this->GetResourceIdPrefix() . $markupName . '.FeatureSource');
-		
-		$markupSchema = MarkupSchemaFactory::CreateMarkupSchema();
-		$sdfParams = new MgCreateSdfParams('Default', $map->GetMapSRS(), $markupSchema);
-		$featureService->CreateFeatureSource($markupSdfResId, $sdfParams);
-
-		// Create the Markup Layer Definition
-
 		$hexFgTransparency = sprintf("%02x", 255 * (100 - $this->args['FILLTRANSPARENCY']) / 100); // Convert % to an alpha value
 		$hexBgTransparency = $this->args['FILLBACKTRANS'] ? "FF" : "00";							 // All or nothing
 		$bold = array_key_exists('LABELBOLD', $this->args) ? "true" : "false";
@@ -222,7 +346,7 @@
 		
         $markupLayerDefinition = file_get_contents("templates/markuplayerdefinition.xml");
         $markupLayerDefinition = sprintf($markupLayerDefinition, 
-			$markupSdfResId->ToString(),						//<ResourceId> - Feature Source
+			$featureSourceId,						            //<ResourceId> - Feature Source
 			$this->args['LABELSIZEUNITS'],						//<Unit> - Mark Label
 			$this->args['LABELFONTSIZE'],						//<SizeX> - Mark Label Size
 			$this->args['LABELFONTSIZE'],						//<SizeY> - Mark Label Size
@@ -269,21 +393,29 @@
 			$this->args['BORDERSIZEUNITS']); 					//<Unit> - Fill
 		
 		$byteSource = new MgByteSource($markupLayerDefinition, strlen($markupLayerDefinition));
-        $layerDefId = new MgResourceIdentifier($this->GetResourceIdPrefix() . $markupName . '.LayerDefinition');
+        //Save to new resource or overwrite existing
+        $layerDefId = new MgResourceIdentifier($bUpdate ? $this->args["EDITMARKUPLAYER"] : ($this->GetResourceIdPrefix() . $markupName . '.LayerDefinition'));
 		$resourceService->SetResource($layerDefId, $byteSource->GetReader(), null);
         
-        //Register markup with markup registry
-        $props = new MgPropertyCollection();
-        $props->Add(new MgStringProperty("ResourceId", $markupSdfResId->ToString()));
-        $props->Add(new MgStringProperty("LayerDefinition", $layerDefId->ToString()));
-        $props->Add(new MgStringProperty("Name", $layerDefId->GetName()));
-        $insertCmd = new MgInsertFeatures("Default:MarkupRegistry", $props);
-        
         $cmds = new MgFeatureCommandCollection();
-        $cmds->Add($insertCmd);
+        //Register markup with markup registry if not updating
+        if (!$bUpdate)
+        {
+            $props = new MgPropertyCollection();
+            $props->Add(new MgStringProperty("ResourceId", $markupSdfResId->ToString()));
+            $props->Add(new MgStringProperty("LayerDefinition", $layerDefId->ToString()));
+            $props->Add(new MgStringProperty("Name", $layerDefId->GetName()));
+            $insertCmd = new MgInsertFeatures("Default:MarkupRegistry", $props);
+            
+            $cmds->Add($insertCmd);
+        }
         
-        $res = $featureService->UpdateFeatures($this->markupRegistryId, $cmds, false);
-        MarkupManager::CleanupReaders($res);
+        if ($cmds->GetCount() > 0) {
+            $res = $featureService->UpdateFeatures($this->markupRegistryId, $cmds, false);
+            MarkupManager::CleanupReaders($res);
+        }
+        
+        return $layerDefId->ToString();
 	}
     
     //Utility function to close all feature readers in a MgPropertyCollection

Modified: trunk/widgets/Redline/editmarkup.php
===================================================================
--- trunk/widgets/Redline/editmarkup.php	2011-12-30 10:04:12 UTC (rev 2501)
+++ trunk/widgets/Redline/editmarkup.php	2012-01-03 17:15:24 UTC (rev 2502)
@@ -160,11 +160,13 @@
 
 		function PromptAndSetMarkupText()
 		{
-			var textInput = document.getElementById("textInput");
+            var widget = Fusion.getWidgetsByType("Redline")[0];
+            if (widget.promptForRedlineLabels) {
+                var textInput = document.getElementById("textInput");
 
-			textLabel = window.prompt("<?=$promptLabelLocal?>", "");
-			textInput.value = (textLabel != null) ? textLabel : "";
-            
+                textLabel = window.prompt("<?=$promptLabelLocal?>", "");
+                textInput.value = (textLabel != null) ? textLabel : "";
+            }
             ClearDigitization();
 		}
 	

Added: trunk/widgets/Redline/editmarkupstyle.php
===================================================================
--- trunk/widgets/Redline/editmarkupstyle.php	                        (rev 0)
+++ trunk/widgets/Redline/editmarkupstyle.php	2012-01-03 17:15:24 UTC (rev 2502)
@@ -0,0 +1,497 @@
+<?php
+    $fusionMGpath = '../../layers/MapGuide/php/';
+    require_once $fusionMGpath . 'Common.php';
+    if(InitializationErrorOccurred())
+    {
+        DisplayInitializationErrorHTML();
+        exit;
+    }
+    require_once $fusionMGpath . 'Utilities.php';
+    require_once $fusionMGpath . 'JSON.php';
+	require_once 'classes/markupcommand.php';
+    require_once 'classes/defaultstyle.php';
+	require_once 'classes/markupmanager.php';
+
+	$args = ($_SERVER['REQUEST_METHOD'] == "POST") ? $_POST : $_GET;
+    $markupManager = new MarkupManager($args);
+    
+    //Get the layer style and feature source for this Layer Definition. The whole UI is initialized from the values found here
+    $style = $markupManager->GetLayerStyle($args["EDITMARKUPLAYER"]);
+    $editFeatureSource = $markupManager->GetFeatureSource($args["EDITMARKUPLAYER"]);
+    
+	$errorMsg = null;
+	$errorDetail = null;
+    
+    SetLocalizedFilesPath(GetLocalizationPath());
+    if(isset($_REQUEST['LOCALE'])) {
+        $locale = $_REQUEST['LOCALE'];
+    } else {
+        $locale = GetDefaultLocale();
+    }
+    
+    $editLayerStyleLocal = GetLocalizedString('REDLINEEDITLAYERSTYLE', $locale );
+    $layerSettingsLocal = GetLocalizedString('REDLINELAYERSETTINGS', $locale );
+    $nameLocal = GetLocalizedString('REDLINENAME', $locale );
+    $pointStyleLocal = GetLocalizedString('REDLINEPOINTSTYLE', $locale );
+    $markerStyleLocal = GetLocalizedString('REDLINEMARKERTYPE', $locale );
+    $squareLocal = GetLocalizedString('REDLINEMARKERSQUARE', $locale );
+    $circleLocal = GetLocalizedString('REDLINEMARKERCIRCLE', $locale );
+    $triangleLocal = GetLocalizedString('REDLINEMARKERTRIANGLE', $locale );
+    $starLocal = GetLocalizedString('REDLINEMARKERSTAR', $locale );
+    $crossLocal = GetLocalizedString('REDLINEMARKERCROSS', $locale );
+    $xLocal = GetLocalizedString('REDLINEMARKERX', $locale );
+    $unitsPtLocal = GetLocalizedString('REDLINEUNITSPT', $locale );
+    $unitsInLocal = GetLocalizedString('REDLINEUNITSIN', $locale );
+    $unitsMmLocal = GetLocalizedString('REDLINEUNITSMM', $locale );
+    $unitsCmLocal = GetLocalizedString('REDLINEUNITSCM', $locale );
+    $unitsMLocal = GetLocalizedString('REDLINEUNITSM', $locale );
+    $markerSizeLocal = GetLocalizedString('REDLINEMARKERSIZE', $locale );
+    $markerColorLocal = GetLocalizedString('REDLINEMARKERCOLOR', $locale );
+    $lineStyleLocal = GetLocalizedString('REDLINELINESTYLE', $locale );
+    $linePatternLocal = GetLocalizedString('REDLINELINEPATTERN', $locale );
+    $solidLocal = GetLocalizedString('REDLINEPATTERNSOLID', $locale );
+    $dashLocal = GetLocalizedString('REDLINEPATTERNDASH', $locale );
+    $dotLocal = GetLocalizedString('REDLINEPATTERNDOT', $locale );
+    $dashDotLocal = GetLocalizedString('REDLINEPATTERNDASHDOT', $locale );
+    $dashDotDotLocal = GetLocalizedString('REDLINEPATTERNDASHDOTDOT', $locale );
+    $railLocal = GetLocalizedString('REDLINEPATTERNRAIL', $locale );
+    $borderLocal = GetLocalizedString('REDLINEPATTERNBORDER', $locale );
+    $divideLocal = GetLocalizedString('REDLINEPATTERNDIVIDE', $locale );
+    $fenceLineLocal = GetLocalizedString('REDLINEPATTERNFENCELINE', $locale );
+    $netLocal = GetLocalizedString('REDLINEPATTERNNET', $locale );
+    $lineLocal = GetLocalizedString('REDLINEPATTERNLINE', $locale );
+    $line45Local = GetLocalizedString('REDLINEPATTERNLINE45', $locale );
+    $line90Local = GetLocalizedString('REDLINEPATTERNLINE90', $locale );
+    $line135Local = GetLocalizedString('REDLINEPATTERNLINE135', $locale );
+    $squareLocal = GetLocalizedString('REDLINEPATTERNSQUARE', $locale );
+    $boxLocal = GetLocalizedString('REDLINEPATTERNBOX', $locale );
+    $crossLocal = GetLocalizedString('REDLINEPATTERNCROSS', $locale );
+    $dolmitLocal = GetLocalizedString('REDLINEPATTERNDOLMIT', $locale );
+    $hexLocal = GetLocalizedString('REDLINEPATTERNHEX', $locale );
+    $sacncrLocal = GetLocalizedString('REDLINEPATTERNSACNCR', $locale );
+    $steelLocal = GetLocalizedString('REDLINEPATTERNSTEEL', $locale );
+    $sizeUnitsLocal = GetLocalizedString('REDLINESIZEUNITS', $locale );
+    $thicknessLocal = GetLocalizedString('REDLINELINETHICKNESS', $locale );
+    $lineColorLocal = GetLocalizedString('REDLINELINECOLOR', $locale );
+    $transparentLocal = GetLocalizedString('REDLINETRANSPARENT', $locale );
+    $polygonStyleLocal = GetLocalizedString('REDLINEPOLYGONSTYLE', $locale );
+    $fillPatternLocal = GetLocalizedString('REDLINEFILLPATTERN', $locale );
+    $fillTransparencyLocal = GetLocalizedString('REDLINEFILLTRANSPARENCY', $locale );
+    $foregroundLocal = GetLocalizedString('REDLINEFOREGROUND', $locale );
+    $backgroundLocal = GetLocalizedString('REDLINEBACKGROUND', $locale );
+    $borderPatternLocal = GetLocalizedString('REDLINEBORDERPATTERN', $locale );
+    $borderColorLocal = GetLocalizedString('REDLINEBORDERCOLOR', $locale );
+    $labelStyleLocal = GetLocalizedString('REDLINELABELSTYLE', $locale );
+    $labelSizeUnitsLocal = GetLocalizedString('REDLINELABELSIZEUNITS', $locale );
+    $borderThicknessLocal = GetLocalizedString('REDLINEBORDERTHICKNESS', $locale );
+    $fontSizeLocal = GetLocalizedString('REDLINELABELFONTSIZE', $locale );
+    $boldLocal = GetLocalizedString('REDLINEFONTBOLD', $locale );
+    $italicLocal = GetLocalizedString('REDLINEFONTITALIC', $locale );
+    $underlineLocal = GetLocalizedString('REDLINEFONTUNDERLINE', $locale );
+    $labelColorLocal = GetLocalizedString('REDLINELABELCOLOR', $locale );
+    $labelBackgroundStyleLocal = GetLocalizedString('REDLINELABELBACKGROUNDSTYLE', $locale );
+    $ghostedLocal = GetLocalizedString('REDLINELABELGHOSTED', $locale );
+    $opaqueLocal = GetLocalizedString('REDLINELABELOPAQUE', $locale );
+?>
+<html>
+<head>
+	<meta http-equiv="Content-type" content="text/html; charset=utf-8">
+	<title>New Markup Layer</title>
+    <link rel="stylesheet" href="Redline.css" type="text/css">
+	<script language="javascript">
+		var SET_MARKER_COLOR 		= 1;
+		var SET_LINE_COLOR 			= 2;
+		var SET_FILL_FORE_COLOR 	= 3;
+		var SET_FILL_BACK_COLOR		= 4;
+		var SET_BORDER_COLOR 		= 5;
+		var SET_LABEL_FORE_COLOR 	= 6;
+		var SET_LABEL_BACK_COLOR 	= 7;
+		var setColor = 0;
+	
+		var markerColor = "<?= $style->MARKER_COLOR ?>";
+		var lineColor = "<?= $style->LINE_COLOR ?>";
+		var fillForeColor = "<?= $style->FILL_FORE_COLOR ?>";
+		var fillBackColor = "<?= $style->FILL_BACK_COLOR ?>";
+		var fillBackTrans = <?= $style->FILL_BACK_TRANS ?>;
+		var borderColor = "<?= $style->BORDER_COLOR ?>";
+		var labelForeColor = "<?= $style->LABEL_FORE_COLOR ?>";
+		var labelBackColor = "<?= $style->LABEL_BACK_COLOR ?>";
+		
+        function CheckName()
+        {
+            var el = document.getElementById("markupName");
+            var mkName = el.value.replace(/^\s+|\s+$/g,"");
+            if (mkName == "") {
+                alert("Please enter a name for this new markup layer");
+                el.focus();
+                return false;
+            }
+            return true;
+        }
+		
+		function PickColor(whichColor, allowTransparency, transparent)
+        {
+            var clr;
+			setColor = whichColor;
+			
+            if (setColor == SET_MARKER_COLOR)
+                clr = markerColor;
+            else if (setColor == SET_LINE_COLOR)
+                clr = lineColor;
+            else if (setColor == SET_FILL_FORE_COLOR)
+                clr = fillForeColor;
+            else if (setColor == SET_FILL_BACK_COLOR)
+                clr = fillBackColor;
+            else if (setColor == SET_BORDER_COLOR)
+                clr = borderColor;
+            else if (setColor == SET_LABEL_FORE_COLOR)
+                clr = labelForeColor;
+            else if (setColor == SET_LABEL_BACK_COLOR)
+                clr = labelBackColor;
+           else
+                return;
+				
+            height = allowTransparency? 470: 445;
+            w = window.open("../../layers/MapGuide/php/ColorPicker.php?LOCALE=en&CLR=" + clr + "&ALLOWTRANS=" + (allowTransparency? "1":"0") + "&TRANS=" + (transparent.value == "true"? "1":"0"), "colorPicker", "toolbar=no,status=no,width=355,height=" + height);
+            w.focus();
+        }
+
+        function OnColorPicked(clr, trans)
+        {
+            if (setColor == SET_MARKER_COLOR)
+                markerColor = clr;
+            else if (setColor == SET_LINE_COLOR)
+                lineColor = clr;
+            else if (setColor == SET_FILL_FORE_COLOR)
+                fillForeColor = clr;
+            else if (setColor == SET_FILL_BACK_COLOR)
+			{
+                fillBackColor = clr;
+				fillBackTrans = trans;
+			}
+            else if (setColor == SET_BORDER_COLOR)
+                borderColor = clr;
+            else if (setColor == SET_LABEL_FORE_COLOR)
+                labelForeColor = clr;
+            else if (setColor == SET_LABEL_BACK_COLOR)
+                labelBackColor = clr;
+           else
+                return;
+
+            UpdateColors();
+        }
+
+        function UpdateColors()
+        {
+            var elt;
+            document.getElementById("markerColor").value = markerColor;
+            elt = document.getElementById("markerSwatch").style;
+            elt.backgroundColor = "#" + markerColor;
+            elt.color = "#" + markerColor;
+
+            document.getElementById("lineColor").value = lineColor;
+            elt = document.getElementById("lineSwatch").style;
+            elt.backgroundColor = "#" + lineColor;
+            elt.color = "#" + lineColor;
+
+            document.getElementById("fillForeColor").value = fillForeColor;
+            elt = document.getElementById("fillFgSwatch").style;
+            elt.backgroundColor = "#" + fillForeColor;
+            elt.color = "#" + fillForeColor;
+
+            document.getElementById("fillBackColor").value = fillBackColor;
+            document.getElementById("fillBackTrans").value = fillBackTrans;
+            elt = document.getElementById("fillBgSwatch").style;
+            elt.backgroundColor = fillBackTrans ? "#FFFFFF" : "#" + fillBackColor;
+            elt.color = fillBackTrans ? "#000000" : "#" + fillBackColor;
+
+            document.getElementById("borderColor").value = borderColor;
+            elt = document.getElementById("borderSwatch").style;
+            elt.backgroundColor = "#" + borderColor;
+            elt.color = "#" + borderColor;
+
+            document.getElementById("labelForeColor").value = labelForeColor;
+            elt = document.getElementById("labelFgSwatch").style;
+            elt.backgroundColor = "#" + labelForeColor;
+            elt.color = "#" + labelForeColor;
+
+            document.getElementById("labelBackColor").value = labelBackColor;
+            elt = document.getElementById("labelBgSwatch").style;
+            elt.backgroundColor = "#" + labelBackColor;
+            elt.color = "#" + labelBackColor;
+        }
+		
+		function Cancel()
+        {
+			window.location.href="markupmain.php?SESSION=<?= $args['SESSION']?>&MAPNAME=<?= $args['MAPNAME']?>";
+		}
+	</script>
+	
+</head>
+
+<body marginwidth=5 marginheight=5 leftmargin=5 topmargin=5 bottommargin=5 rightmargin=5>
+
+<?php if ($errorMsg == null) { ?>
+
+<form action="markupmain.php" method="post" enctype="application/x-www-form-urlencoded" id="newMarkupLayerForm" target="_self">
+
+<input name="SESSION" type="hidden" value="<?= $args['SESSION'] ?>">
+<input name="MAPNAME" type="hidden" value="<?= $args['MAPNAME'] ?>">
+<input name="MARKUPCOMMAND" type="hidden" value="<?= MarkupCommand::EditStyle ?>">
+<input name="EDITMARKUPLAYER" type="hidden" value="<?= $args['EDITMARKUPLAYER'] ?>">
+<input name="EDITFEATURESOURCE" type="hidden" value="<?= $editFeatureSource ?>">
+<input name="MARKUPLAYERNAME" type="hidden" value="<?= $args['MARKUPLAYERNAME'] ?>">
+
+<table class="RegText" border="0" cellspacing="0" width="100%%">
+	<tr><td id="elTitle" colspan="2" class="Title"><?= $editLayerStyleLocal ?><hr></td></tr>
+	<tr><td colspan="2" class="SubTitle"><?= $layerSettingsLocal ?></td></tr>
+	<tr><td colspan="2"><?= $nameLocal ?></td></tr>
+	<tr><td colspan="2"><strong class="Ctrl" style="width:100%" ><?= $args["MARKUPLAYERNAME"] ?></strong><br><br></td></tr>
+
+	<tr><td colspan="2" class="SubTitle"><?= $pointStyleLocal ?></td></tr>
+	<tr>
+		<td colspan="2">
+			<?=$markerStyleLocal?><br>
+			<select class="Ctrl" name="MARKERTYPE" size="1">
+				<option value="Square" selected="selected"><?=$squareLocal?></option>
+				<option value="Circle"><?=$circleLocal?></option>
+				<option value="Triangle"><?=$triangleLocal?></option>
+				<option value="Star"><?=$starLocal?></option>
+				<option value="Cross"><?=$crossLocal?></option>
+				<option value="X"><?=$xLocal?></option>
+			</select>
+		</td>
+	</tr>
+	<tr>
+		<td>
+			<?=$sizeUnitsLocal?><br>
+			<select class="Ctrl" name="MARKERSIZEUNITS" size="1">
+				<option value="Points" selected="selected"><?=$unitsPtLocal?></option>
+				<option value="Inches"><?=$unitsInLocal?></option>
+				<option value="Millimeters"><?=$unitsMmLocal?></option>
+				<option value="Centimeters"><?=$unitsCmLocal?></option>
+				<option value="Meters"><?=$unitsMLocal?></option>
+			</select>
+		</td>
+		<td>
+			<?=$markerSizeLocal?><br>
+			<input class="Ctrl" name="MARKERSIZE" type="text" value="<?= $style->MARKER_SIZE ?>">
+		</td>
+	</tr>
+	<tr>
+		<td colspan="2">
+			<?=$markerColorLocal?><br>
+			<span class="Swatch" id="markerSwatch" style="color: #<?= $style->MARKER_COLOR ?>; background-color: #<?= $style->MARKER_COLOR ?>">&nbsp;<?=$transparentLocal?>&nbsp;</span>&nbsp;&nbsp;
+			<input class="Ctrl" type="button" value="..." style="width: 22px;" onClick="PickColor(SET_MARKER_COLOR,false,false)">
+			<br><br>
+		</td>
+	</tr>
+
+	<tr><td colspan="2" class="SubTitle"><?=$lineStyleLocal?></td></tr>
+	<tr>
+		<td colspan="2">
+			<?=$linePatternLocal?><br>
+			<select class="Ctrl" name="LINEPATTERN" size="1">
+				<option value="Solid" <?= strcmp($style->LINE_PATTERN, "Solid") == 0 ? 'selected="selected"' : '' ?>><?=$solidLocal?></option>
+				<option value="Dash" <?= strcmp($style->LINE_PATTERN, "Dash") == 0 ? 'selected="selected"' : '' ?>><?=$dashLocal?></option>
+				<option value="Dot" <?= strcmp($style->LINE_PATTERN, "Dot") == 0 ? 'selected="selected"' : '' ?>><?=$dotLocal?></option>
+				<option value="DashDot" <?= strcmp($style->LINE_PATTERN, "DashDot") == 0 ? 'selected="selected"' : '' ?>><?=$dashDotLocal?></option>
+				<option value="DashDotDot" <?= strcmp($style->LINE_PATTERN, "DashDotDot") == 0 ? 'selected="selected"' : '' ?>><?=$dashDotDotLocal?></option>
+				<option value="Rail" <?= strcmp($style->LINE_PATTERN, "Rail") == 0 ? 'selected="selected"' : '' ?>><?=$railLocal?></option>
+				<option value="BORDER" <?= strcmp($style->LINE_PATTERN, "BORDER") == 0 ? 'selected="selected"' : '' ?>><?=$borderLocal?></option>
+				<option value="DIVIDE" <?= strcmp($style->LINE_PATTERN, "DIVIDE") == 0 ? 'selected="selected"' : '' ?>><?=$divideLocal?></option>
+				<option value="FENCELINE1" <?= strcmp($style->LINE_PATTERN, "FENCELINE1") == 0 ? 'selected="selected"' : '' ?>><?=$fenceLineLocal?></option>
+			</select>
+		</td>
+	</tr>	
+	<tr>
+		<td width="50%">
+			<?=$sizeUnitsLocal?><br>
+			<select class="Ctrl" name="LINESIZEUNITS" size="1">
+				<option value="Points" <?= strcmp($style->LINE_SIZE_UNITS, "Points") == 0 ? 'selected="selected"' : '' ?>><?=$unitsPtLocal?></option>
+				<option value="Inches" <?= strcmp($style->LINE_SIZE_UNITS, "Inches") == 0 ? 'selected="selected"' : '' ?>><?=$unitsInLocal?></option>
+				<option value="Millimeters" <?= strcmp($style->LINE_SIZE_UNITS, "Millimeters") == 0 ? 'selected="selected"' : '' ?>><?=$unitsMmLocal?></option>
+				<option value="Centimeters" <?= strcmp($style->LINE_SIZE_UNITS, "Centimeters") == 0 ? 'selected="selected"' : '' ?>><?=$unitsCmLocal?></option>
+				<option value="Meters" <?= strcmp($style->LINE_SIZE_UNITS, "Meters") == 0 ? 'selected="selected"' : '' ?>><?=$unitsMLocal?></option>
+			</select>
+		</td>
+		<td width="50%">
+			<?=$thicknessLocal?><br>
+			<input class="Ctrl" name="LINETHICKNESS" type="text" value="<?= $style->LINE_THICKNESS ?>">
+		</td>
+	</tr>
+	<tr>	
+		<td colspan="2">
+			<?=$lineColorLocal?><br>
+			<span class="Swatch" id="lineSwatch" style="color: #<?= $style->LINE_COLOR ?>; background-color: #<?= $style->LINE_COLOR ?>">&nbsp;<?=$transparentLocal?>&nbsp;</span>&nbsp;&nbsp;
+			<input class="Ctrl" type="button" value="..." style="width: 22px;" onClick="PickColor(SET_LINE_COLOR,false,false)">
+			<br><br>
+		</td>
+	</tr>	
+	
+	
+	<tr><td colspan="2" class="SubTitle"><?=$polygonStyleLocal?></td></tr>
+	<tr>
+		<td width="50%">
+			<?=$fillPatternLocal?><br>
+			<select class="Ctrl" name="FILLPATTERN" size="1">
+				<option value="Solid" <?= strcmp($style->FILL_PATTERN, "Solid") == 0 ? 'selected="selected"' : '' ?>><?=$solidLocal?></option>
+				<option value="Net" <?= strcmp($style->FILL_PATTERN, "Net") == 0 ? 'selected="selected"' : '' ?>><?=$netLocal?></option>
+				<option value="Line" <?= strcmp($style->FILL_PATTERN, "Line") == 0 ? 'selected="selected"' : '' ?>><?=$lineLocal?></option>
+				<option value="Line_45" <?= strcmp($style->FILL_PATTERN, "Line_45") == 0 ? 'selected="selected"' : '' ?>><?=$line45Local?></option>
+				<option value="Line_90" <?= strcmp($style->FILL_PATTERN, "Line_90") == 0 ? 'selected="selected"' : '' ?>><?=$line90Local?></option>
+				<option value="Line_135" <?= strcmp($style->FILL_PATTERN, "Line_135") == 0 ? 'selected="selected"' : '' ?>><?=$line135Local?></option>
+				<option value="Square" <?= strcmp($style->FILL_PATTERN, "Square") == 0 ? 'selected="selected"' : '' ?>><?=$squareLocal?></option>
+				<option value="Box" <?= strcmp($style->FILL_PATTERN, "Box") == 0 ? 'selected="selected"' : '' ?>><?=$boxLocal?></option>
+				<option value="Cross" <?= strcmp($style->FILL_PATTERN, "Cross") == 0 ? 'selected="selected"' : '' ?>><?=$crossLocal?></option>
+				<option value="Dash" <?= strcmp($style->FILL_PATTERN, "Dash") == 0 ? 'selected="selected"' : '' ?>><?=$dashLocal?></option>
+				<option value="Dolmit" <?= strcmp($style->FILL_PATTERN, "Dolmit") == 0 ? 'selected="selected"' : '' ?>><?=$dolmitLocal?></option>
+				<option value="Hex" <?= strcmp($style->FILL_PATTERN, "Hex") == 0 ? 'selected="selected"' : '' ?>><?=$hexLocal?></option>
+				<option value="Sacncr" <?= strcmp($style->FILL_PATTERN, "Sacncr") == 0 ? 'selected="selected"' : '' ?>><?=$sacncrLocal?></option>
+				<option value="Steel" <?= strcmp($style->FILL_PATTERN, "Steel") == 0 ? 'selected="selected"' : '' ?>><?=$steelLocal?></option>
+			</select>
+		</td>
+		<td width="50%">
+			<?=$fillTransparencyLocal?><br>
+			<input class="Ctrl" name="FILLTRANSPARENCY" type="text"  maxlength="3" value="<? $style->FILL_TRANSPARENCY ?>" style="width:50px">%
+		</td>
+	</tr>
+	<tr>	
+		<td width="50%" valign="top">
+			<?=$foregroundLocal?><br>
+			<span class="Swatch" id="fillFgSwatch" style="color: #<?= $style->FILL_FORE_COLOR ?>; background-color: #<?= $style->FILL_FORE_COLOR ?>">&nbsp;<?=$transparentLocal?>&nbsp;</span>&nbsp;&nbsp;
+			<input class="Ctrl" type="button" value="..." style="width: 22px;" onClick="PickColor(SET_FILL_FORE_COLOR,false,false)">
+			<br><br>
+		</td>
+		<td width="50%" valign="top">
+			<?=$backgroundLocal?><br>
+			<span class="Swatch" id="fillBgSwatch" style="color: #<?= $style->FILL_BACK_COLOR ?>; background-color: #<?= $style->FILL_BACK_COLOR ?>">&nbsp;<?=$transparentLocal?>&nbsp;</span>&nbsp;&nbsp;
+			<input class="Ctrl" type="button" value="..." style="width: 22px;" onClick="PickColor(SET_FILL_BACK_COLOR,true,fillBackTrans)">
+			<br>
+		</td>
+	</tr>	
+	<tr><td colspan="2"><hr></td></tr>
+	<tr>
+		<td colspan="2">
+			<?=$borderPatternLocal?><br>
+			<select class="Ctrl" name="BORDERPATTERN" size="1">
+				<option value="Solid" <?= strcmp($style->BORDER_PATTERN, "Solid") == 0 ? 'selected="selected"' : '' ?>><?=$solidLocal?></option>
+				<option value="Dash" <?= strcmp($style->BORDER_PATTERN, "Dash") == 0 ? 'selected="selected"' : '' ?>><?=$dashLocal?></option>
+				<option value="Dot" <?= strcmp($style->BORDER_PATTERN, "Dot") == 0 ? 'selected="selected"' : '' ?>><?=$dotLocal?></option>
+				<option value="DashDot" <?= strcmp($style->BORDER_PATTERN, "DashDot") == 0 ? 'selected="selected"' : '' ?>><?=$dashDotLocal?></option>
+				<option value="DashDotDot" <?= strcmp($style->BORDER_PATTERN, "DashDotDot") == 0 ? 'selected="selected"' : '' ?>><?=$dashDotDotLocal?></option>
+				<option value="Rail" <?= strcmp($style->BORDER_PATTERN, "Rail") == 0 ? 'selected="selected"' : '' ?>><?=$railLocal?></option>
+				<option value="BORDER" <?= strcmp($style->BORDER_PATTERN, "BORDER") == 0 ? 'selected="selected"' : '' ?>><?=$borderLocal?></option>
+				<option value="DIVIDE" <?= strcmp($style->BORDER_PATTERN, "DIVIDE") == 0 ? 'selected="selected"' : '' ?>><?=$divideLocal?></option>
+				<option value="FENCELINE1" <?= strcmp($style->BORDER_PATTERN, "FENCELINE1") == 0 ? 'selected="selected"' : '' ?>><?=$fenceLineLocal?></option>
+			</select>
+		</td>
+	</tr>	
+	<tr>
+		<td width="50%">
+			<?=$sizeUnitsLocal?><br>
+			<select class="Ctrl" name="BORDERSIZEUNITS" size="1">
+				<option value="Points" <?= strcmp($style->BORDER_SIZE_UNITS, "Points") == 0 ? 'selected="selected"' : '' ?>><?=$unitsPtLocal?></option>
+				<option value="Inches" <?= strcmp($style->BORDER_SIZE_UNITS, "Inches") == 0 ? 'selected="selected"' : '' ?>><?=$unitsInLocal?></option>
+				<option value="Millimeters" <?= strcmp($style->BORDER_SIZE_UNITS, "Millimeters") == 0 ? 'selected="selected"' : '' ?>><?=$unitsMmLocal?></option>
+				<option value="Centimeters" <?= strcmp($style->BORDER_SIZE_UNITS, "Centimeters") == 0 ? 'selected="selected"' : '' ?>><?=$unitsCmLocal?></option>
+				<option value="Meters" <?= strcmp($style->BORDER_SIZE_UNITS, "Meters") == 0 ? 'selected="selected"' : '' ?>><?=$unitsMLocal?></option>
+			</select>
+		</td>
+		<td width="50%">
+			<?=$borderThicknessLocal?><br>
+			<input class="Ctrl" name="BORDERTHICKNESS" type="text" value="<?= $style->BORDER_THICKNESS ?>">
+		</td>
+	</tr>
+	<tr>	
+		<td colspan="2">
+			<?=$borderColorLocal?><br>
+			<span class="Swatch" id="borderSwatch" style="color: #<?= $style->BORDER_COLOR ?>; background-color: #<?= $style->BORDER_COLOR ?>">&nbsp;transparent&nbsp;</span>&nbsp;&nbsp;
+			<input class="Ctrl" type="button" value="..." style="width: 22px;" onClick="PickColor(SET_BORDER_COLOR,false,false)">
+			<br><br>
+		</td>
+	</tr>	
+
+	<tr><td colspan="2" class="SubTitle"><?=$labelStyleLocal?></td></tr>
+	<tr>
+		<td width="50%">
+			<?=$sizeUnitsLocal?><br>
+			<select class="Ctrl" name="LABELSIZEUNITS" size="1">
+				<option value="Points" <?= strcmp($style->LABEL_SIZE_UNITS, "Points") == 0 ? 'selected="selected"' : '' ?>><?=$unitsPtLocal?></option>
+				<option value="Inches" <?= strcmp($style->LABEL_SIZE_UNITS, "Inches") == 0 ? 'selected="selected"' : '' ?>><?=$unitsInLocal?></option>
+				<option value="Millimeters" <?= strcmp($style->LABEL_SIZE_UNITS, "Millimeters") == 0 ? 'selected="selected"' : '' ?>><?=$unitsMmLocal?></option>
+				<option value="Centimeters" <?= strcmp($style->LABEL_SIZE_UNITS, "Centimeters") == 0 ? 'selected="selected"' : '' ?>><?=$unitsCmLocal?></option>
+				<option value="Meters" <?= strcmp($style->LABEL_SIZE_UNITS, "Meters") == 0 ? 'selected="selected"' : '' ?>><?=$unitsMLocal?></option>
+			</select>
+		</td>
+		<td width="50%">
+			<?=$fontSizeLocal?><br>
+			<input class="Ctrl" name="LABELFONTSIZE" type="text" value="<?= $style->LABEL_FONT_SIZE ?>">
+		</td>
+	</tr>
+	<tr>
+		<td colspan="2" valign="middle">
+			<input name="LABELBOLD" type="checkbox" value="bold" <?= strcmp(strval($style->LABEL_BOLD), "true") == 0 ? 'checked="checked"' : '' ?>><label><?=$boldLocal?></label>&nbsp;&nbsp;
+			<input name="LABELITALIC" type="checkbox" value="italic" <?= strcmp(strval($style->LABEL_ITALIC), "true") == 0 ? 'checked="checked"' : '' ?>><label><?=$italicLocal?></label>&nbsp;&nbsp;
+			<input name="LABELUNDERLINE" type="checkbox" value="underline" <?= strcmp(strval($style->LABEL_UNDERLINE), "true") == 0 ? 'checked="checked"' : '' ?>><label><?=$underlineLocal?></label>
+		</td>
+	</tr>
+	<tr>	
+		<td width="50%" valign="top">
+			<?=$labelColorLocal?><br>
+			<span class="Swatch" id="labelFgSwatch" style="color: #<?= $style->LABEL_FORE_COLOR ?>; background-color: #<?= $style->LABEL_FORE_COLOR ?>">&nbsp;<?=$transparentLocal?>&nbsp;</span>&nbsp;&nbsp;
+			<input class="Ctrl" type="button" value="..." style="width: 22px;" onClick="PickColor(SET_LABEL_FORE_COLOR,false,false)">
+			<br><br>
+		</td>
+		<td width="50%" valign="top">
+			<?=$backgroundLocal?><br>
+			<span class="Swatch" id="labelBgSwatch" style="color: #<?= $style->LABEL_BACK_COLOR ?>; background-color: #<?= $style->LABEL_BACK_COLOR ?>">&nbsp;<?=$transparentLocal?>&nbsp;</span>&nbsp;&nbsp;
+			<input class="Ctrl" type="button" value="..." style="width: 22px;" onClick="PickColor(SET_LABEL_BACK_COLOR,false,false)">
+			<br>
+		</td>
+	</tr>	
+	<tr>
+		<td colspan="2">
+			<?=$labelBackgroundStyleLocal?><br>
+			<select class="Ctrl" name="LABELBACKSTYLE" size="1">
+				<option value="Ghosted" <?= strcmp($style->LABEL_BACK_STYLE, "Ghosted") == 0 ? 'selected="selected"' : '' ?>><?=$ghostedLocal?></option>
+				<option value="Opaque" <?= strcmp($style->LABEL_BACK_STYLE, "Opaque") == 0 ? 'selected="selected"' : '' ?>><?=$opaqueLocal?></option>
+				<option value="Transparent" <?= strcmp($style->LABEL_BACK_STYLE, "Transparent") == 0 ? 'selected="selected"' : '' ?>><?=$transparentLocal?></option>
+			</select>
+		</td>
+	</tr>	
+
+	<tr>
+		<td colspan="2" align="right">
+			<hr>
+			<input class="Ctrl" name="" type="submit" value="OK" onClick="return CheckName()" style="width:85px">
+			<input class="Ctrl" type="button" value="Cancel" style="width:85px" onClick="return Cancel()">
+		</td>
+	</tr>
+
+</table>
+
+<input name="MARKERCOLOR" type="hidden" id="markerColor" value="<?= $style->MARKER_COLOR ?>">
+<input name="LINECOLOR" type="hidden" id="lineColor" value="<?= $style->LINE_COLOR ?>">
+<input name="FILLFORECOLOR" type="hidden" id="fillForeColor" value="<?= $style->FILL_FORE_COLOR ?>">
+<input name="FILLBACKCOLOR" type="hidden" id="fillBackColor" value="<?= $style->FILL_BACK_COLOR ?>">
+<input name="FILLBACKTRANS" type="hidden" id="fillBackTrans" value="<?= $style->FILL_BACK_TRANS ?>">
+<input name="BORDERCOLOR" type="hidden" id="borderColor" value="<?= $style->BORDER_COLOR ?>">
+<input name="LABELFORECOLOR" type="hidden" id="labelForeColor" value="<?= $style->LABEL_FORE_COLOR ?>">
+<input name="LABELBACKCOLOR" type="hidden" id="labelBackColor" value="<?= $style->LABEL_BACK_COLOR ?>">
+
+</form>
+
+<?php } else { ?>
+
+<table class="RegText" border="0" cellspacing="0" width="100%%">
+	<tr><td class="Title">Error<hr></td></tr>
+	<tr><td><?= $errorMsg ?></td></tr>
+	<tr><td><?= $errorDetail ?></td></tr>
+</table>
+
+<?php } ?>
+
+</body>
+
+</html>

Modified: trunk/widgets/Redline/markupmain.php
===================================================================
--- trunk/widgets/Redline/markupmain.php	2011-12-30 10:04:12 UTC (rev 2501)
+++ trunk/widgets/Redline/markupmain.php	2012-01-03 17:15:24 UTC (rev 2502)
@@ -8,11 +8,12 @@
     }
     require_once $fusionMGpath . 'Utilities.php';
     require_once $fusionMGpath . 'JSON.php';
-	require_once 'classes/markupmanager.php';
+	require_once 'classes/defaultstyle.php';
+    require_once 'classes/markupmanager.php';
 	require_once 'classes/markupcommand.php';
 
 	$args = ($_SERVER['REQUEST_METHOD'] == "POST") ? $_POST : $_GET;
-
+    
 	$refreshMap = false;
 	$errorMsg = null;
 	$errorDetail = null;
@@ -32,7 +33,7 @@
 		{
 			$cmd = $args['MARKUPCOMMAND'];
 			switch ($cmd) {
-			case MarkupCommand::Create:
+			case MarkupCommand::EditStyle:
 				$markupManager->CreateMarkup();
 				$refreshMap = true;
 				break;
@@ -72,15 +73,20 @@
         $addEditLocal = GetLocalizedString('REDLINEEDIT', $locale );
         $removeFromMapLocal = GetLocalizedString('REDLINEREMOVEFROMMAP', $locale );
         $downloadLocal = GetLocalizedString('REDLINEDOWNLOADSDF', $locale );
+        $uploadLocal = GetLocalizedString('REDLINEUPLOADSDF', $locale );
+        $editStyleLocal = GetLocalizedString('REDLINEEDITSTYLE', $locale );
+        $redlineCreateFailureLocal = GetLocalizedString('REDLINECREATEFAILURE', $locale );
 	}
 	catch (MgException $mge)
 	{
-		$errorMsg = $mge->GetMessage();
+		$errorMsg = $mge->GetExceptionMessage();
 		$errorDetail = $mge->GetDetails();
+        //die("MG ERROR: " . $errorMsg.$errorDetail."\n".$mge->GetStackTrace());
 	}
 	catch (Exception $e)
 	{
 		$errorMsg = $e->GetMessage();
+        //die("PHP ERROR: " . $errorMsg);
 	}
 ?>
 <html>
@@ -88,7 +94,8 @@
 	<title>Manage Markups</title>
     <meta http-equiv="Content-type" content="text/html; charset=utf-8">
     <link rel="stylesheet" href="Redline.css" type="text/css">
-	
+	<script language="javascript" src="../../layers/MapGuide/MapGuideViewerApi.js"></script>
+    <script language="javascript" src="../../common/browserdetect.js"></script>
 	<script language="javascript">
         var session = '<?= $args['SESSION'] ?>';
         var mapName = '<?= $args['MAPNAME'] ?>';
@@ -100,6 +107,8 @@
 		var CMD_EDIT	= <?= MarkupCommand::Edit ?>;
 		var CMD_CLOSE	= <?= MarkupCommand::Close ?>;
         var CMD_DOWNLOAD = <?= MarkupCommand::Download ?>;
+        var CMD_UPLOAD = <?= MarkupCommand::Upload ?>;
+        var CMD_EDITSTYLE = <?= MarkupCommand::EditStyle ?>;
 			
 		function SubmitCommand(cmd)
 		{
@@ -107,15 +116,56 @@
 			commandInput.value = cmd;
 
             var markupForm = document.getElementById("markupForm");
-			if (cmd == CMD_NEW)
-				markupForm.action = "newmarkup.php";
-			else if (cmd == CMD_EDIT)
-				markupForm.action = "editmarkup.php";
-			else
-				markupForm.action = "markupmain.php";
-					
-			markupForm.submit();
+			if (cmd == CMD_NEW) {
+                Fusion.ajaxRequest("widgets/redline/newmarkup.php", {
+                    onSuccess: OpenLayers.Function.bind(OnMarkupCreated, this),
+                    onFailure: OpenLayers.Function.bind(OnMarkupCreateFailure, this),
+                    parameters: {
+                        SESSION: session,
+                        MAPNAME: mapName
+                    }
+                });
+            } else {
+                if (cmd == CMD_EDIT) {
+                    markupForm.action = "editmarkup.php";
+                } else if (cmd == CMD_UPLOAD) {
+                    markupForm.action = "uploadmarkup.php";
+                } else if (cmd == CMD_EDITSTYLE) {
+                    markupForm.action = "editmarkupstyle.php";
+                }
+                else {
+                    markupForm.action = "markupmain.php";
+                }
+                markupForm.submit();
+            }
 		}
+        
+        function OnMarkupCreated(response)
+        {
+            eval("var o = " + response.responseText);
+            if (!o.success) {
+                var msg = "Error \n" + o.message;
+                alert(msg);
+            }
+            else {
+                //Add to markup layers on map
+                var layers = document.getElementById("openMarkup");
+                var opt = new Option();
+                opt.selected = true;
+                opt.text = o.layerName;
+                opt.value = o.layerDefinition;
+                layers.options[layers.options.length] = opt;
+                var map = parent.Fusion.getMapByName(mapName);
+                map.reloadMap();
+                //Go straight to edit mode
+                SubmitCommand(CMD_EDIT);
+            }
+        }
+        
+        function OnMarkupCreateFailure()
+        {
+            alert("Failed to create redline");
+        }
 		
 		function OnAvailableMarkupChange()
 		{
@@ -129,6 +179,8 @@
 				openBtn.disabled = false;
 				deleteBtn.disabled = false;
                 downloadBtn.disabled = false;
+                
+                document.getElementById("markupLayerName").value = availableSelect.options[availableSelect.selectedIndex].text;
 			}
 			else
 			{
@@ -143,17 +195,28 @@
             var openSelect = document.getElementById("openMarkup");
 			var editBtn = document.getElementById("editBtn");
 			var closeBtn = document.getElementById("closeBtn");
+            var editStyleBtn = document.getElementById("editStyleBtn");
 			
-			if (openSelect.selectedIndex >= 0)
+			if (openSelect.options.length > 0 && openSelect.selectedIndex >= 0)
 			{
 				editBtn.disabled = false;
 				closeBtn.disabled = false;
+                editStyleBtn.disabled = false;
 			}
 			else
 			{
 				editBtn.disabled = true;
 				closeBtn.disabled = true;
+                editStyleBtn.disabled = true;
 			}
+            
+            if (openSelect.options.length > 0) {
+                var selOpt = openSelect.options[openSelect.selectedIndex];
+                document.getElementById("editMarkupLayerId").value = selOpt.value;
+                document.getElementById("markupLayerName").value = selOpt.text;
+            } else {
+                document.getElementById("editMarkupLayerId").value = "";
+            }
 		} 
 		
 		function OnLoad()
@@ -200,6 +263,9 @@
 			<input class="Ctrl" type="button" id="deleteBtn" onClick="SubmitCommand(CMD_DELETE)" value="<?=$deleteLocal?>" style="width:85px">
 			<input class="Ctrl" type="button" id="refreshBtn" onClick="SubmitCommand(CMD_REFRESH)" value="<?=$refreshLocal?>" style="width:85px">
             <input class="Ctrl" type="button" id="downloadBtn" onClick="SubmitCommand(CMD_DOWNLOAD)" value="<?=$downloadLocal?>" style="width:85px">
+            <!--
+            <input class="Ctrl" type="button" id="uploadBtn" onClick="SubmitCommand(CMD_UPLOAD)" value="<?=$uploadLocal?>" style="width:85px">
+            -->
 			<br><br>
 		</td>
 	</tr>
@@ -223,13 +289,16 @@
 		<td>
 			<input class="Ctrl" type="button" id="editBtn" onClick="SubmitCommand(CMD_EDIT)" value="<?=$addEditLocal?>" style="width:125px">
 			<input class="Ctrl" type="button" id="closeBtn" onClick="SubmitCommand(CMD_CLOSE)" value="<?=$removeFromMapLocal?>" style="width:125px">
+            <input class="Ctrl" type="button" id="editStyleBtn" onClick="SubmitCommand(CMD_EDITSTYLE)" value="<?=$editStyleLocal?>" style="width:125px">
 			<br><br>
 		</td>
-	</tr>	
+	</tr>
 </table>
 <input name="SESSION" type="hidden" value="<?= $args['SESSION'] ?>">
 <input name="MAPNAME" type="hidden" value="<?= $args['MAPNAME'] ?>">
 <input name="MARKUPCOMMAND" type="hidden" value="" id="commandInput">
+<input name="EDITMARKUPLAYER" type="hidden" value="" id="editMarkupLayerId">
+<input name="MARKUPLAYERNAME" type="hidden" value="" id="markupLayerName">
 </form>
 
 <?php } else { ?>

Modified: trunk/widgets/Redline/newmarkup.php
===================================================================
--- trunk/widgets/Redline/newmarkup.php	2011-12-30 10:04:12 UTC (rev 2501)
+++ trunk/widgets/Redline/newmarkup.php	2012-01-03 17:15:24 UTC (rev 2502)
@@ -1,488 +1,92 @@
 <?php
+
     $fusionMGpath = '../../layers/MapGuide/php/';
     require_once $fusionMGpath . 'Common.php';
+    
+    header('Content-type: application/json');
+    header('X-JSON: true');
+    
+    global $initializationErrorMessage;
     if(InitializationErrorOccurred())
     {
-        DisplayInitializationErrorHTML();
+        echo "{success: false, refreshMap: false, message:'".$initializationErrorMessage."'}";
         exit;
     }
     require_once $fusionMGpath . 'Utilities.php';
     require_once $fusionMGpath . 'JSON.php';
-	require_once 'classes/markupcommand.php';
+    require_once 'classes/defaultstyle.php';
+	require_once 'classes/markupmanager.php';
 
 	$args = ($_SERVER['REQUEST_METHOD'] == "POST") ? $_POST : $_GET;
 
 	$errorMsg = null;
 	$errorDetail = null;
-    
+
     SetLocalizedFilesPath(GetLocalizationPath());
     if(isset($_REQUEST['LOCALE'])) {
         $locale = $_REQUEST['LOCALE'];
     } else {
         $locale = GetDefaultLocale();
     }
+
+    $responseJson = null;
+	try
+	{
+        $args["MARKUPNAME"] = "MarkupLayer";
+        
+        $args["MARKERCOLOR"] = DefaultStyle::MARKER_COLOR;
+        $args["MARKERTYPE"] = DefaultStyle::MARKER_TYPE;
+        $args["MARKERSIZEUNITS"] = DefaultStyle::MARKER_SIZE_UNITS;
+        $args["MARKERSIZE"] = DefaultStyle::MARKER_SIZE;
+        $args["LINECOLOR"] = DefaultStyle::LINE_COLOR;
+        $args["LINEPATTERN"] = DefaultStyle::LINE_PATTERN;
+        $args["LINESIZEUNITS"] = DefaultStyle::LINE_SIZE_UNITS;
+        $args["LINETHICKNESS"] = DefaultStyle::LINE_THICKNESS;
+        $args["FILLPATTERN"] = DefaultStyle::FILL_PATTERN;
+        $args["FILLTRANSPARENCY"] = DefaultStyle::FILL_TRANSPARENCY;
+        $args["FILLFORECOLOR"] = DefaultStyle::FILL_FORE_COLOR;
+        $args["FILLBACKCOLOR"] = DefaultStyle::FILL_BACK_COLOR;
+        $args["FILLBACKTRANS"] = DefaultStyle::FILL_BACK_TRANS;
+        $args["BORDERPATTERN"] = DefaultStyle::BORDER_PATTERN;
+        $args["BORDERSIZEUNITS"] = DefaultStyle::BORDER_SIZE_UNITS;
+        $args["BORDERCOLOR"] = DefaultStyle::BORDER_COLOR;
+        $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)
+	{
+		$errorMsg = $e->GetMessage();
+        $responseJson = "{success: false, refreshMap: false, message:'$errorMsg'}";
+	}
     
-    $newLayerLocal = GetLocalizedString('REDLINENEWLAYER', $locale );
-    $layerSettingsLocal = GetLocalizedString('REDLINELAYERSETTINGS', $locale );
-    $nameLocal = GetLocalizedString('REDLINENAME', $locale );
-    $pointStyleLocal = GetLocalizedString('REDLINEPOINTSTYLE', $locale );
-    $markerStyleLocal = GetLocalizedString('REDLINEMARKERTYPE', $locale );
-    $squareLocal = GetLocalizedString('REDLINEMARKERSQUARE', $locale );
-    $circleLocal = GetLocalizedString('REDLINEMARKERCIRCLE', $locale );
-    $triangleLocal = GetLocalizedString('REDLINEMARKERTRIANGLE', $locale );
-    $starLocal = GetLocalizedString('REDLINEMARKERSTAR', $locale );
-    $crossLocal = GetLocalizedString('REDLINEMARKERCROSS', $locale );
-    $xLocal = GetLocalizedString('REDLINEMARKERX', $locale );
-    $unitsPtLocal = GetLocalizedString('REDLINEUNITSPT', $locale );
-    $unitsInLocal = GetLocalizedString('REDLINEUNITSIN', $locale );
-    $unitsMmLocal = GetLocalizedString('REDLINEUNITSMM', $locale );
-    $unitsCmLocal = GetLocalizedString('REDLINEUNITSCM', $locale );
-    $unitsMLocal = GetLocalizedString('REDLINEUNITSM', $locale );
-    $markerSizeLocal = GetLocalizedString('REDLINEMARKERSIZE', $locale );
-    $markerColorLocal = GetLocalizedString('REDLINEMARKERCOLOR', $locale );
-    $lineStyleLocal = GetLocalizedString('REDLINELINESTYLE', $locale );
-    $linePatternLocal = GetLocalizedString('REDLINELINEPATTERN', $locale );
-    $solidLocal = GetLocalizedString('REDLINEPATTERNSOLID', $locale );
-    $dashLocal = GetLocalizedString('REDLINEPATTERNDASH', $locale );
-    $dotLocal = GetLocalizedString('REDLINEPATTERNDOT', $locale );
-    $dashDotLocal = GetLocalizedString('REDLINEPATTERNDASHDOT', $locale );
-    $dashDotDotLocal = GetLocalizedString('REDLINEPATTERNDASHDOTDOT', $locale );
-    $railLocal = GetLocalizedString('REDLINEPATTERNRAIL', $locale );
-    $borderLocal = GetLocalizedString('REDLINEPATTERNBORDER', $locale );
-    $divideLocal = GetLocalizedString('REDLINEPATTERNDIVIDE', $locale );
-    $fenceLineLocal = GetLocalizedString('REDLINEPATTERNFENCELINE', $locale );
-    $netLocal = GetLocalizedString('REDLINEPATTERNNET', $locale );
-    $lineLocal = GetLocalizedString('REDLINEPATTERNLINE', $locale );
-    $line45Local = GetLocalizedString('REDLINEPATTERNLINE45', $locale );
-    $line90Local = GetLocalizedString('REDLINEPATTERNLINE90', $locale );
-    $line135Local = GetLocalizedString('REDLINEPATTERNLINE135', $locale );
-    $squareLocal = GetLocalizedString('REDLINEPATTERNSQUARE', $locale );
-    $boxLocal = GetLocalizedString('REDLINEPATTERNBOX', $locale );
-    $crossLocal = GetLocalizedString('REDLINEPATTERNCROSS', $locale );
-    $dolmitLocal = GetLocalizedString('REDLINEPATTERNDOLMIT', $locale );
-    $hexLocal = GetLocalizedString('REDLINEPATTERNHEX', $locale );
-    $sacncrLocal = GetLocalizedString('REDLINEPATTERNSACNCR', $locale );
-    $steelLocal = GetLocalizedString('REDLINEPATTERNSTEEL', $locale );
-    $sizeUnitsLocal = GetLocalizedString('REDLINESIZEUNITS', $locale );
-    $thicknessLocal = GetLocalizedString('REDLINELINETHICKNESS', $locale );
-    $lineColorLocal = GetLocalizedString('REDLINELINECOLOR', $locale );
-    $transparentLocal = GetLocalizedString('REDLINETRANSPARENT', $locale );
-    $polygonStyleLocal = GetLocalizedString('REDLINEPOLYGONSTYLE', $locale );
-    $fillPatternLocal = GetLocalizedString('REDLINEFILLPATTERN', $locale );
-    $fillTransparencyLocal = GetLocalizedString('REDLINEFILLTRANSPARENCY', $locale );
-    $foregroundLocal = GetLocalizedString('REDLINEFOREGROUND', $locale );
-    $backgroundLocal = GetLocalizedString('REDLINEBACKGROUND', $locale );
-    $borderPatternLocal = GetLocalizedString('REDLINEBORDERPATTERN', $locale );
-    $borderColorLocal = GetLocalizedString('REDLINEBORDERCOLOR', $locale );
-    $labelStyleLocal = GetLocalizedString('REDLINELABELSTYLE', $locale );
-    $labelSizeUnitsLocal = GetLocalizedString('REDLINELABELSIZEUNITS', $locale );
-    $borderThicknessLocal = GetLocalizedString('REDLINEBORDERTHICKNESS', $locale );
-    $fontSizeLocal = GetLocalizedString('REDLINELABELFONTSIZE', $locale );
-    $boldLocal = GetLocalizedString('REDLINEFONTBOLD', $locale );
-    $italicLocal = GetLocalizedString('REDLINEFONTITALIC', $locale );
-    $underlineLocal = GetLocalizedString('REDLINEFONTUNDERLINE', $locale );
-    $labelColorLocal = GetLocalizedString('REDLINELABELCOLOR', $locale );
-    $labelBackgroundStyleLocal = GetLocalizedString('REDLINELABELBACKGROUNDSTYLE', $locale );
-    $ghostedLocal = GetLocalizedString('REDLINELABELGHOSTED', $locale );
-    $opaqueLocal = GetLocalizedString('REDLINELABELOPAQUE', $locale );
-?>
-<html>
-<head>
-	<meta http-equiv="Content-type" content="text/html; charset=utf-8">
-	<title>New Markup Layer</title>
-    <link rel="stylesheet" href="Redline.css" type="text/css">
-	<script language="javascript">
-		var SET_MARKER_COLOR 		= 1;
-		var SET_LINE_COLOR 			= 2;
-		var SET_FILL_FORE_COLOR 	= 3;
-		var SET_FILL_BACK_COLOR		= 4;
-		var SET_BORDER_COLOR 		= 5;
-		var SET_LABEL_FORE_COLOR 	= 6;
-		var SET_LABEL_BACK_COLOR 	= 7;
-		var setColor = 0;
-	
-		var markerColor = "FF0000";
-		var lineColor = "0000FF";
-		var fillForeColor = "00FF00";
-		var fillBackColor = "00FF00";
-		var fillBackTrans = true;
-		var borderColor = "000000";
-		var labelForeColor = "000000";
-		var labelBackColor = "FFFFFF";
-		
-        function CheckName()
-        {
-            var el = document.getElementById("markupName");
-            var mkName = el.value.replace(/^\s+|\s+$/g,"");
-            if (mkName == "") {
-                alert("Please enter a name for this new markup layer");
-                el.focus();
-                return false;
-            }
-            return true;
-        }
-		
-		function PickColor(whichColor, allowTransparency, transparent)
-        {
-            var clr;
-			setColor = whichColor;
-			
-            if (setColor == SET_MARKER_COLOR)
-                clr = markerColor;
-            else if (setColor == SET_LINE_COLOR)
-                clr = lineColor;
-            else if (setColor == SET_FILL_FORE_COLOR)
-                clr = fillForeColor;
-            else if (setColor == SET_FILL_BACK_COLOR)
-                clr = fillBackColor;
-            else if (setColor == SET_BORDER_COLOR)
-                clr = borderColor;
-            else if (setColor == SET_LABEL_FORE_COLOR)
-                clr = labelForeColor;
-            else if (setColor == SET_LABEL_BACK_COLOR)
-                clr = labelBackColor;
-           else
-                return;
-				
-            height = allowTransparency? 470: 445;
-            w = window.open("../../layers/MapGuide/php/ColorPicker.php?LOCALE=<?=$locale?>&CLR=" + clr + "&ALLOWTRANS=" + (allowTransparency? "1":"0") + "&TRANS=" + (transparent.value == "true"? "1":"0"), "colorPicker", "toolbar=no,status=no,width=355,height=" + height);
-            w.focus();
-        }
+    $responseJson = str_replace("\n", "\\n", $responseJson);
+    echo $responseJson;
 
-        function OnColorPicked(clr, trans)
-        {
-            if (setColor == SET_MARKER_COLOR)
-                markerColor = clr;
-            else if (setColor == SET_LINE_COLOR)
-                lineColor = clr;
-            else if (setColor == SET_FILL_FORE_COLOR)
-                fillForeColor = clr;
-            else if (setColor == SET_FILL_BACK_COLOR)
-			{
-                fillBackColor = clr;
-				fillBackTrans = trans;
-			}
-            else if (setColor == SET_BORDER_COLOR)
-                borderColor = clr;
-            else if (setColor == SET_LABEL_FORE_COLOR)
-                labelForeColor = clr;
-            else if (setColor == SET_LABEL_BACK_COLOR)
-                labelBackColor = clr;
-           else
-                return;
-
-            UpdateColors();
-        }
-
-        function UpdateColors()
-        {
-            var elt;
-            document.getElementById("markerColor").value = markerColor;
-            elt = document.getElementById("markerSwatch").style;
-            elt.backgroundColor = "#" + markerColor;
-            elt.color = "#" + markerColor;
-
-            document.getElementById("lineColor").value = lineColor;
-            elt = document.getElementById("lineSwatch").style;
-            elt.backgroundColor = "#" + lineColor;
-            elt.color = "#" + lineColor;
-
-            document.getElementById("fillForeColor").value = fillForeColor;
-            elt = document.getElementById("fillFgSwatch").style;
-            elt.backgroundColor = "#" + fillForeColor;
-            elt.color = "#" + fillForeColor;
-
-            document.getElementById("fillBackColor").value = fillBackColor;
-            document.getElementById("fillBackTrans").value = fillBackTrans;
-            elt = document.getElementById("fillBgSwatch").style;
-            elt.backgroundColor = fillBackTrans ? "#FFFFFF" : "#" + fillBackColor;
-            elt.color = fillBackTrans ? "#000000" : "#" + fillBackColor;
-
-            document.getElementById("borderColor").value = borderColor;
-            elt = document.getElementById("borderSwatch").style;
-            elt.backgroundColor = "#" + borderColor;
-            elt.color = "#" + borderColor;
-
-            document.getElementById("labelForeColor").value = labelForeColor;
-            elt = document.getElementById("labelFgSwatch").style;
-            elt.backgroundColor = "#" + labelForeColor;
-            elt.color = "#" + labelForeColor;
-
-            document.getElementById("labelBackColor").value = labelBackColor;
-            elt = document.getElementById("labelBgSwatch").style;
-            elt.backgroundColor = "#" + labelBackColor;
-            elt.color = "#" + labelBackColor;
-        }
-		
-		 function Cancel()
-        {
-			window.location.href="markupmain.php?SESSION=<?= $args['SESSION']?>&MAPNAME=<?= $args['MAPNAME']?>";
-		}
-	</script>
-	
-</head>
-
-<body marginwidth=5 marginheight=5 leftmargin=5 topmargin=5 bottommargin=5 rightmargin=5>
-
-<?php if ($errorMsg == null) { ?>
-
-<form action="markupmain.php" method="post" enctype="application/x-www-form-urlencoded" id="newMarkupLayerForm" target="_self">
-
-<input name="SESSION" type="hidden" value="<?= $args['SESSION'] ?>">
-<input name="MAPNAME" type="hidden" value="<?= $args['MAPNAME'] ?>">
-<input name="MARKUPCOMMAND" type="hidden" value="<?= MarkupCommand::Create ?>">
-
-<table class="RegText" border="0" cellspacing="0" width="100%%">
-	<tr><td id="elTitle" colspan="2" class="Title"><?= $newLayerLocal ?><hr></td></tr>
-
-	<tr><td colspan="2" class="SubTitle"><?= $layerSettingsLocal ?></td></tr>
-	<tr><td colspan="2"><?= $nameLocal ?></td></tr>
-	<tr><td colspan="2"><input class="Ctrl" id="markupName" name="MARKUPNAME" type="text" maxlength="255" style="width:100%"><br><br></td></tr>
-
-	<tr><td colspan="2" class="SubTitle"><?= $pointStyleLocal ?></td></tr>
-	<tr>
-		<td colspan="2">
-			<?=$markerStyleLocal?><br>
-			<select class="Ctrl" name="MARKERTYPE" size="1">
-				<option value="Square" selected="selected"><?=$squareLocal?></option>
-				<option value="Circle"><?=$circleLocal?></option>
-				<option value="Triangle"><?=$triangleLocal?></option>
-				<option value="Star"><?=$starLocal?></option>
-				<option value="Cross"><?=$crossLocal?></option>
-				<option value="X"><?=$xLocal?></option>
-			</select>
-		</td>
-	</tr>
-	<tr>
-		<td>
-			<?=$sizeUnitsLocal?><br>
-			<select class="Ctrl" name="MARKERSIZEUNITS" size="1">
-				<option value="Points" selected="selected"><?=$unitsPtLocal?></option>
-				<option value="Inches"><?=$unitsInLocal?></option>
-				<option value="Millimeters"><?=$unitsMmLocal?></option>
-				<option value="Centimeters"><?=$unitsCmLocal?></option>
-				<option value="Meters"><?=$unitsMLocal?></option>
-			</select>
-		</td>
-		<td>
-			<?=$markerSizeLocal?><br>
-			<input class="Ctrl" name="MARKERSIZE" type="text" value="10">
-		</td>
-	</tr>
-	<tr>
-		<td colspan="2">
-			<?=$markerColorLocal?><br>
-			<span class="Swatch" id="markerSwatch" style="color: #ff0000; background-color: #ff0000">&nbsp;<?=$transparentLocal?>&nbsp;</span>&nbsp;&nbsp;
-			<input class="Ctrl" type="button" value="..." style="width: 22px;" onClick="PickColor(SET_MARKER_COLOR,false,false)">
-			<br><br>
-		</td>
-	</tr>
-
-	<tr><td colspan="2" class="SubTitle"><?=$lineStyleLocal?></td></tr>
-	<tr>
-		<td colspan="2">
-			<?=$linePatternLocal?><br>
-			<select class="Ctrl" name="LINEPATTERN" size="1">
-				<option value="Solid" selected="selected"><?=$solidLocal?></option>
-				<option value="Dash"><?=$dashLocal?></option>
-				<option value="Dot"><?=$dotLocal?></option>
-				<option value="DashDot"><?=$dashDotLocal?></option>
-				<option value="DashDotDot"><?=$dashDotDotLocal?></option>
-				<option value="Rail"><?=$railLocal?></option>
-				<option value="BORDER"><?=$borderLocal?></option>
-				<option value="DIVIDE"><?=$divideLocal?></option>
-				<option value="FENCELINE1"><?=$fenceLineLocal?></option>
-			</select>
-		</td>
-	</tr>	
-	<tr>
-		<td width="50%">
-			<?=$sizeUnitsLocal?><br>
-			<select class="Ctrl" name="LINESIZEUNITS" size="1">
-				<option value="Points"><?=$unitsPtLocal?></option>
-				<option value="Inches"><?=$unitsInLocal?></option>
-				<option value="Millimeters"><?=$unitsMmLocal?></option>
-				<option value="Centimeters" selected="selected"><?=$unitsCmLocal?></option>
-				<option value="Meters"><?=$unitsMLocal?></option>
-			</select>
-		</td>
-		<td width="50%">
-			<?=$thicknessLocal?><br>
-			<input class="Ctrl" name="LINETHICKNESS" type="text" value="0">
-		</td>
-	</tr>
-	<tr>	
-		<td colspan="2">
-			<?=$lineColorLocal?><br>
-			<span class="Swatch" id="lineSwatch" style="color: #0000ff; background-color: #0000ff">&nbsp;<?=$transparentLocal?>&nbsp;</span>&nbsp;&nbsp;
-			<input class="Ctrl" type="button" value="..." style="width: 22px;" onClick="PickColor(SET_LINE_COLOR,false,false)">
-			<br><br>
-		</td>
-	</tr>	
-	
-	
-	<tr><td colspan="2" class="SubTitle"><?=$polygonStyleLocal?></td></tr>
-	<tr>
-		<td width="50%">
-			<?=$fillPatternLocal?><br>
-			<select class="Ctrl" name="FILLPATTERN" size="1">
-				<option value="Solid" selected><?=$solidLocal?></option>
-				<option value="Net"><?=$netLocal?></option>
-				<option value="Line"><?=$lineLocal?></option>
-				<option value="Line_45"><?=$line45Local?></option>
-				<option value="Line_90"><?=$line90Local?></option>
-				<option value="Line_135"><?=$line135Local?></option>
-				<option value="Square"><?=$squareLocal?></option>
-				<option value="Box"><?=$boxLocal?></option>
-				<option value="Cross"><?=$crossLocal?></option>
-				<option value="Dash"><?=$dashLocal?></option>
-				<option value="Dolmit"><?=$dolmitLocal?></option>
-				<option value="Hex"><?=$hexLocal?></option>
-				<option value="Sacncr"><?=$sacncrLocal?></option>
-				<option value="Steel"><?=$steelLocal?></option>
-			</select>
-		</td>
-		<td width="50%">
-			<?=$fillTransparencyLocal?><br>
-			<input class="Ctrl" name="FILLTRANSPARENCY" type="text"  maxlength="3" value="0" style="width:50px">%
-		</td>
-	</tr>
-	<tr>	
-		<td width="50%" valign="top">
-			<?=$foregroundLocal?><br>
-			<span class="Swatch" id="fillFgSwatch" style="color: #00ff00; background-color: #00ff00">&nbsp;<?=$transparentLocal?>&nbsp;</span>&nbsp;&nbsp;
-			<input class="Ctrl" type="button" value="..." style="width: 22px;" onClick="PickColor(SET_FILL_FORE_COLOR,false,false)">
-			<br><br>
-		</td>
-		<td width="50%" valign="top">
-			<?=$backgroundLocal?><br>
-			<span class="Swatch" id="fillBgSwatch">&nbsp;<?=$transparentLocal?>&nbsp;</span>&nbsp;&nbsp;
-			<input class="Ctrl" type="button" value="..." style="width: 22px;" onClick="PickColor(SET_FILL_BACK_COLOR,true,fillBackTrans)">
-			<br>
-		</td>
-	</tr>	
-	<tr><td colspan="2"><hr></td></tr>
-	<tr>
-		<td colspan="2">
-			<?=$borderPatternLocal?><br>
-			<select class="Ctrl" name="BORDERPATTERN" size="1">
-				<option value="Solid" selected="selected"><?=$solidLocal?></option>
-				<option value="Dash"><?=$dashLocal?></option>
-				<option value="Dot"><?=$dotLocal?></option>
-				<option value="DashDot"><?=$dashDotLocal?></option>
-				<option value="DashDotDot"><?=$dashDotDotLocal?></option>
-				<option value="Rail"><?=$railLocal?></option>
-				<option value="BORDER"><?=$borderLocal?></option>
-				<option value="DIVIDE"><?=$divideLocal?></option>
-				<option value="FENCELINE1"><?=$fenceLineLocal?></option>
-			</select>
-		</td>
-	</tr>	
-	<tr>
-		<td width="50%">
-			<?=$sizeUnitsLocal?><br>
-			<select class="Ctrl" name="BORDERSIZEUNITS" size="1">
-				<option value="Points"><?=$unitsPtLocal?></option>
-				<option value="Inches"><?=$unitsInLocal?></option>
-				<option value="Millimeters"><?=$unitsMmLocal?></option>
-				<option value="Centimeters" selected="selected"><?=$unitsCmLocal?></option>
-				<option value="Meters"><?=$unitsMLocal?></option>
-			</select>
-		</td>
-		<td width="50%">
-			<?=$borderThicknessLocal?><br>
-			<input class="Ctrl" name="BORDERTHICKNESS" type="text" value="0">
-		</td>
-	</tr>
-	<tr>	
-		<td colspan="2">
-			<?=$borderColorLocal?><br>
-			<span class="Swatch" id="borderSwatch" style="color: #000000; background-color: #000000">&nbsp;transparent&nbsp;</span>&nbsp;&nbsp;
-			<input class="Ctrl" type="button" value="..." style="width: 22px;" onClick="PickColor(SET_BORDER_COLOR,false,false)">
-			<br><br>
-		</td>
-	</tr>	
-
-	<tr><td colspan="2" class="SubTitle"><?=$labelStyleLocal?></td></tr>
-	<tr>
-		<td width="50%">
-			<?=$sizeUnitsLocal?><br>
-			<select class="Ctrl" name="LABELSIZEUNITS" size="1">
-				<option value="Points" selected="selected"><?=$unitsPtLocal?></option>
-				<option value="Inches"><?=$unitsInLocal?></option>
-				<option value="Millimeters"><?=$unitsMmLocal?></option>
-				<option value="Centimeters"><?=$unitsCmLocal?></option>
-				<option value="Meters"><?=$unitsMLocal?></option>
-			</select>
-		</td>
-		<td width="50%">
-			<?=$fontSizeLocal?><br>
-			<input class="Ctrl" name="LABELFONTSIZE" type="text" value="10">
-		</td>
-	</tr>
-	<tr>
-		<td colspan="2" valign="middle">
-			<input name="LABELBOLD" type="checkbox" value="bold"><label><?=$boldLocal?></label>&nbsp;&nbsp;
-			<input name="LABELITALIC" type="checkbox" value="italic"><label><?=$italicLocal?></label>&nbsp;&nbsp;
-			<input name="LABELUNDERLINE" type="checkbox" value="underline"><label><?=$underlineLocal?></label>
-		</td>
-	</tr>
-	<tr>	
-		<td width="50%" valign="top">
-			<?=$labelColorLocal?><br>
-			<span class="Swatch" id="labelFgSwatch" style="color: #000000; background-color: #000000">&nbsp;<?=$transparentLocal?>&nbsp;</span>&nbsp;&nbsp;
-			<input class="Ctrl" type="button" value="..." style="width: 22px;" onClick="PickColor(SET_LABEL_FORE_COLOR,false,false)">
-			<br><br>
-		</td>
-		<td width="50%" valign="top">
-			<?=$backgroundLocal?><br>
-			<span class="Swatch" id="labelBgSwatch" style="color: #FFFFFF; background-color: #FFFFFF">&nbsp;<?=$transparentLocal?>&nbsp;</span>&nbsp;&nbsp;
-			<input class="Ctrl" type="button" value="..." style="width: 22px;" onClick="PickColor(SET_LABEL_BACK_COLOR,false,false)">
-			<br>
-		</td>
-	</tr>	
-	<tr>
-		<td colspan="2">
-			<?=$labelBackgroundStyleLocal?><br>
-			<select class="Ctrl" name="LABELBACKSTYLE" size="1">
-				<option value="Ghosted" selected="selected"><?=$ghostedLocal?></option>
-				<option value="Opaque"><?=$opaqueLocal?></option>
-				<option value="Transparent"><?=$transparentLocal?></option>
-			</select>
-		</td>
-	</tr>	
-
-	<tr>
-		<td colspan="2" align="right">
-			<hr>
-			<input class="Ctrl" name="" type="submit" value="OK" onClick="return CheckName()" style="width:85px">
-			<input class="Ctrl" type="button" value="Cancel" style="width:85px" onClick="return Cancel()">
-		</td>
-	</tr>
-
-</table>
-
-<input name="MARKERCOLOR" type="hidden" id="markerColor" value="FF0000">
-<input name="LINECOLOR" type="hidden" id="lineColor" value="0000FF">
-<input name="FILLFORECOLOR" type="hidden" id="fillForeColor" value="00FF00">
-<input name="FILLBACKCOLOR" type="hidden" id="fillBackColor" value="00FF00">
-<input name="FILLBACKTRANS" type="hidden" id="fillBackTrans" value="true">
-<input name="BORDERCOLOR" type="hidden" id="borderColor" value="000000">
-<input name="LABELFORECOLOR" type="hidden" id="labelForeColor" value="000000">
-<input name="LABELBACKCOLOR" type="hidden" id="labelBackColor" value="FFFFFF">
-
-</form>
-
-<?php } else { ?>
-
-<table class="RegText" border="0" cellspacing="0" width="100%%">
-	<tr><td class="Title">Error<hr></td></tr>
-	<tr><td><?= $errorMsg ?></td></tr>
-	<tr><td><?= $errorDetail ?></td></tr>
-</table>
-
-<?php } ?>
-
-</body>
-
-</html>
+?>
\ No newline at end of file

Modified: trunk/widgets/Redline.js
===================================================================
--- trunk/widgets/Redline.js	2011-12-30 10:04:12 UTC (rev 2501)
+++ trunk/widgets/Redline.js	2012-01-03 17:15:24 UTC (rev 2502)
@@ -44,11 +44,17 @@
 
     // a reference to a redline taskPane
     taskPane: null,
-
+    
+    // Indicates whether to prompt for text labels on recorded redlines
+    promptForRedlineLabels: false,
+    
     initializeWidget: function(widgetTag) {
         var json = widgetTag.extension;
         this.mapWidget = Fusion.getWidgetById('Map');
 
+        if (json.PromptForRedlineLabels)
+            this.promptForRedlineLabels = (json.PromptForRedlineLabels[0] == "true");
+
         // register Redline specific events
         this.registerEventID(Fusion.Event.REDLINE_FEATURE_ADDED);
 
@@ -88,7 +94,7 @@
 
     // the panel url
     panelUrl:  'widgets/Redline/markupmain.php',
-
+    
     initialize: function(widget,widgetLocation) {
         this.widget = widget;
         this.widget.registerForEvent(Fusion.Event.REDLINE_FEATURE_ADDED, OpenLayers.Function.bind(this.featureAdded, this));

Modified: trunk/widgets/widgetinfo/redline.xml
===================================================================
--- trunk/widgets/widgetinfo/redline.xml	2011-12-30 10:04:12 UTC (rev 2501)
+++ trunk/widgets/widgetinfo/redline.xml	2012-01-03 17:15:24 UTC (rev 2502)
@@ -18,35 +18,11 @@
         <DefaultValue>TaskPane</DefaultValue>
     </Parameter>
     <Parameter>
-      <Name>FeatureStyle</Name>
-      <Label>Feature Style</Label>
-      <Type>string</Type>
-      <Description>A style map configuration string for features (format TBD).</Description>
-      <IsMandatory>false</IsMandatory>
-      <DefaultValue></DefaultValue>
+        <Name>PromptForRedlineLabels</Name>
+        <Description>Indicates whether to prompt the user for label input when recording redlines. Default is false</Description>
+        <Type>boolean</Type>
+        <Label>PromptForRedlineLabels</Label>
+        <DefaultValue>false</DefaultValue>
+        <IsMandatory>false</IsMandatory>
     </Parameter>
-    <Parameter>
-      <Name>DefaultControl</Name>
-      <Label>Default Control</Label>
-      <Type>String</Type>
-      <Description>The drawing control that is selected by default.</Description>
-      <IsMandatory>false</IsMandatory>
-      <DefaultValue>point</DefaultValue>
-      <AllowedValue>
-        <Name>point</Name>
-        <Label>Point</Label>
-      </AllowedValue>
-      <AllowedValue>
-        <Name>line</Name>
-        <Label>Line</Label>
-      </AllowedValue>
-      <AllowedValue>
-        <Name>rectangle</Name>
-        <Label>Rectangle</Label>
-      </AllowedValue>
-      <AllowedValue>
-        <Name>polygon</Name>
-        <Label>Polygon</Label>
-      </AllowedValue>
-    </Parameter>
 </WidgetInfo>



More information about the fusion-commits mailing list