[mapguide-commits] r7147 - sandbox/jng/weblayout/Web/src/mapviewerphp

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Fri Oct 19 11:55:15 PDT 2012


Author: jng
Date: 2012-10-19 11:55:14 -0700 (Fri, 19 Oct 2012)
New Revision: 7147

Modified:
   sandbox/jng/weblayout/Web/src/mapviewerphp/common.php
   sandbox/jng/weblayout/Web/src/mapviewerphp/mainframe.php
   sandbox/jng/weblayout/Web/src/mapviewerphp/mapframe.php
Log:
PHP viewer updates to read and pass/plug the new Web Layout properties

Modified: sandbox/jng/weblayout/Web/src/mapviewerphp/common.php
===================================================================
--- sandbox/jng/weblayout/Web/src/mapviewerphp/common.php	2012-10-19 18:54:17 UTC (rev 7146)
+++ sandbox/jng/weblayout/Web/src/mapviewerphp/common.php	2012-10-19 18:55:14 UTC (rev 7147)
@@ -241,10 +241,10 @@
     return $validMapName;
 }
 
-function ValidateColorString($proposedColorString)
+function ValidateColorString($proposedColorString, $digits = 6)
 {
     $validColorString = "000000";
-    if ($proposedColorString != null && preg_match('/^[A-Fa-f0-9]{6}$/', $proposedColorString))
+    if ($proposedColorString != null && preg_match('/^[A-Fa-f0-9]{'.$digits.'}$/', $proposedColorString))
     {
         $validColorString = $proposedColorString;
     }

Modified: sandbox/jng/weblayout/Web/src/mapviewerphp/mainframe.php
===================================================================
--- sandbox/jng/weblayout/Web/src/mapviewerphp/mainframe.php	2012-10-19 18:54:17 UTC (rev 7146)
+++ sandbox/jng/weblayout/Web/src/mapviewerphp/mainframe.php	2012-10-19 18:55:14 UTC (rev 7147)
@@ -28,6 +28,7 @@
 $orgSessionId = '';
 $username = '';
 $password = '';
+$startupScriptCode = '';
 $curFlyout = 0;
 $cmds = array();
 
@@ -120,6 +121,12 @@
         $infoPane = $webLayout->GetInformationPane();
         $taskBar = $taskPane->GetTaskBar();
         $mapDef = $webLayout->GetMapDefinition();
+        
+        $startupScriptCode = $webLayout->GetStartupScript();
+        $selectionColor = $webLayout->GetSelectionColor();
+        $mapImgFormat = $webLayout->GetMapImageFormat();
+        $selImgFormat = $webLayout->GetSelectionImageFormat();
+        $pointBuffer = $webLayout->GetPointSelectionBuffer();
 
         $showTaskPane = $taskPane->IsVisible();
         $showTaskBar = $taskBar->IsVisible();
@@ -453,6 +460,10 @@
                                     $locale,
                                     $webLayout->GetHyperlinkTarget(), $webLayout->GetHyperlinkTargetFrame(),
                                     $webLayout->IsZoomControlVisible()? 1: 0,
+                                    $selectionColor,
+                                    $mapImgFormat,
+                                    $selImgFormat,
+                                    $pointBuffer,
                                     $sessionParam,
                                     $vpath . "formframe.php",
                                     $taskbarHeight+1, $srcTaskBar,
@@ -477,6 +488,10 @@
                                     $webLayout->GetHyperlinkTarget(),
                                     $webLayout->GetHyperlinkTargetFrame(),
                                     $webLayout->IsZoomControlVisible()? 1: 0,
+                                    $selectionColor,
+                                    $mapImgFormat,
+                                    $selImgFormat,
+                                    $pointBuffer,
                                     $sessionParam,
                                     $srcTaskFrame,
                                     $vpath . "formframe.php",
@@ -516,6 +531,7 @@
                     $userCode,
                     $taskItemTexts,
                     $selAwareCmds,
+                    $startupScriptCode,
                     $vpath . "quickplotpanel.php",
                     $vpath . "measureui.php",
                     $vpath . "searchprompt.php",

Modified: sandbox/jng/weblayout/Web/src/mapviewerphp/mapframe.php
===================================================================
--- sandbox/jng/weblayout/Web/src/mapviewerphp/mapframe.php	2012-10-19 18:54:17 UTC (rev 7146)
+++ sandbox/jng/weblayout/Web/src/mapviewerphp/mapframe.php	2012-10-19 18:55:14 UTC (rev 7147)
@@ -32,6 +32,10 @@
 $hlTgt = '';
 $hlTgtName = '';
 $showSlider = true;
+$selectionColor = '0000FFFF';
+$mapImgFormat = 'PNG';
+$selImgFormat = 'PNG';
+$pointBufferSize = 2;
 
 GetRequestParameters();
 
@@ -144,6 +148,10 @@
                     $locale,
                     $vpath . "getselectedfeatures.php",
                     $scaleCreationCode,
+                    $selectionColor,
+                    $mapImgFormat,
+                    $selImgFormat,
+                    $pointBufferSize,
                     $vpath . "ajaxviewerabout.php",
                     $vpath . "legendctrl.php",
                     urlencode($mapName),
@@ -166,8 +174,8 @@
     global $mapDefinition, $type;
     global $infoWidth, $showLegend, $showProperties, $sessionId;
     global $locale, $hlTgt, $hlTgtName, $showSlider;
+    global $selectionColor, $mapImgFormat, $selImgFormat, $pointBufferSize;
 
-
     $sessionId = ValidateSessionId(GetParameter($params, 'SESSION'));
     $locale = ValidateLocaleString(GetParameter($params, 'LOCALE'));
     $hlTgt = ValidateHyperlinkTargetValue(GetParameter($params, 'HLTGT'));
@@ -178,6 +186,10 @@
     $showSlider = (GetIntParameter($params, 'SHOWSLIDER') == 1);
     $infoWidth = GetIntParameter($params, 'INFOWIDTH');
     $type = GetParameter($params, 'TYPE');
+    $selectionColor = ValidateColorString(GetParameter($params, 'SELCOLOR'), 8);
+    $mapImgFormat = GetParameter($params, 'MAPIMGFORMAT');
+    $selImgFormat = GetParameter($params, 'SELIMGFORMAT');
+    $pointBufferSize = GetIntParameter($params, 'POINTBUFFERSIZE');
 }
 
 function GetRequestParameters()



More information about the mapguide-commits mailing list