[fusion-commits] r1982 - in sandbox/jxlib-3.0: . layers/Generic lib widgets widgets/About widgets/Help widgets/Print widgets/Query widgets/Query/classes widgets/TaskPane widgets/Theme/classes

svn_fusion at osgeo.org svn_fusion at osgeo.org
Tue Nov 17 11:48:54 EST 2009


Author: pagameba
Date: 2009-11-17 11:48:54 -0500 (Tue, 17 Nov 2009)
New Revision: 1982

Modified:
   sandbox/jxlib-3.0/
   sandbox/jxlib-3.0/layers/Generic/Generic.js
   sandbox/jxlib-3.0/lib/fusion.js
   sandbox/jxlib-3.0/widgets/About/About.html
   sandbox/jxlib-3.0/widgets/Help/Help.html
   sandbox/jxlib-3.0/widgets/Legend.js
   sandbox/jxlib-3.0/widgets/Print/Print.html
   sandbox/jxlib-3.0/widgets/Query/classes/query.php
   sandbox/jxlib-3.0/widgets/Query/querymain.php
   sandbox/jxlib-3.0/widgets/TaskPane/TaskPane.html
   sandbox/jxlib-3.0/widgets/Theme/classes/theme.php
Log:
sync with trunk, fix small legend issue with themed layers


Property changes on: sandbox/jxlib-3.0
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk:1958-1971
   + /trunk:1958-1971,1973-1980

Modified: sandbox/jxlib-3.0/layers/Generic/Generic.js
===================================================================
--- sandbox/jxlib-3.0/layers/Generic/Generic.js	2009-11-17 16:47:42 UTC (rev 1981)
+++ sandbox/jxlib-3.0/layers/Generic/Generic.js	2009-11-17 16:48:54 UTC (rev 1982)
@@ -103,20 +103,32 @@
                 this.mapTag.layerOptions.type = G_SATELLITE_MAP;
                 break;
               case 'G_NORMAL_MAP':
+				this.mapTag.layerOptions.type = G_NORMAL_MAP;
               default:
-                this.mapTag.layerOptions.type = G_NORMAL_MAP;
+				// For the re-loaded Google layers
+				if(this.mapTag.layerOptions.type == G_PHYSICAL_MAP)
+					this.mapTag.layerOptions.type = G_PHYSICAL_MAP;
+				else if(this.mapTag.layerOptions.type == G_HYBRID_MAP)
+					this.mapTag.layerOptions.type = G_HYBRID_MAP;
+				else if(this.mapTag.layerOptions.type == G_SATELLITE_MAP)
+				    this.mapTag.layerOptions.type = G_SATELLITE_MAP;
+				else 
+					this.mapTag.layerOptions.type = G_NORMAL_MAP;
                 break;
             }
             break;
          case 'VirtualEarth':         
              switch (this.mapTag.layerOptions.type) {   //VE layer types are enumerated values
                case 'Aerial':              //defined in VEMapStyle from the VE api
+			   case 'a':
                  this.mapTag.layerOptions.type = VEMapStyle.Aerial;
                  break;
                case 'Shaded':
+			   case 's':
                  this.mapTag.layerOptions.type = VEMapStyle.Shaded;
                  break;
                case 'Hybrid':
+			   case 'h':
                  this.mapTag.layerOptions.type = VEMapStyle.Hybrid;
                  break;
                default:
@@ -127,12 +139,15 @@
          case 'Yahoo':
             switch (this.mapTag.layerOptions.type) {   //Yahoo is similar to google
               case 'YAHOO_MAP_SAT':              //defined by YMap, not a string
+			  case 'YAHOO_SAT':
                 this.mapTag.layerOptions.type = YAHOO_MAP_SAT;
                 break;
               case 'YAHOO_MAP_HYB':
+			  case 'YAHOO_HYB':
                 this.mapTag.layerOptions.type = YAHOO_MAP_HYB;
                 break;
               case 'YAHOO_MAP_REG':
+			  case "YAHOO_REG":
               default:
                 this.mapTag.layerOptions.type = YAHOO_MAP_REG;
                 break;

Modified: sandbox/jxlib-3.0/lib/fusion.js
===================================================================
--- sandbox/jxlib-3.0/lib/fusion.js	2009-11-17 16:47:42 UTC (rev 1981)
+++ sandbox/jxlib-3.0/lib/fusion.js	2009-11-17 16:48:54 UTC (rev 1982)
@@ -1215,9 +1215,9 @@
 	}
 	
 	var appDefUrl = Fusion.getQueryParam('ApplicationDefinition'); 
-	if(appDefUrl && 
-	    (appDefUrl.indexOf('Library://') == 0 ||
-	    appDefUrl.indexOf('Session://') == 0)){
+	if(appDefUrl && (
+	    appDefUrl.indexOf('Library') == 0 ||
+	    appDefUrl.indexOf('Session') == 0)){
     	createSessionId();	
 		var xhr = new getXmlHttpRequest(); 
 		var mapAgentUrl = getAgentUrl(); 

Modified: sandbox/jxlib-3.0/widgets/About/About.html
===================================================================
--- sandbox/jxlib-3.0/widgets/About/About.html	2009-11-17 16:47:42 UTC (rev 1981)
+++ sandbox/jxlib-3.0/widgets/About/About.html	2009-11-17 16:48:54 UTC (rev 1982)
@@ -1,4 +1,4 @@
-<html>
+<html>
 <head>
     <title>About Fusion</title>
 </head>

Modified: sandbox/jxlib-3.0/widgets/Help/Help.html
===================================================================
--- sandbox/jxlib-3.0/widgets/Help/Help.html	2009-11-17 16:47:42 UTC (rev 1981)
+++ sandbox/jxlib-3.0/widgets/Help/Help.html	2009-11-17 16:48:54 UTC (rev 1982)
@@ -1,4 +1,4 @@
-<html>
+<html>
 <head>
     <title></title>
 </head>

Modified: sandbox/jxlib-3.0/widgets/Legend.js
===================================================================
--- sandbox/jxlib-3.0/widgets/Legend.js	2009-11-17 16:47:42 UTC (rev 1981)
+++ sandbox/jxlib-3.0/widgets/Legend.js	2009-11-17 16:48:54 UTC (rev 1982)
@@ -769,6 +769,7 @@
         domIcon: 'jxTreeIcon',
         domLabel: 'jxTreeLabel',
         domTree: 'jxTree',
+        checkbox: 'fusionLegendCheckboxInput',
         layerInfo: 'fusionLayerInfo',
         layerInfoIcon: 'fusionLayerInfoIcon',
         groupInfo: 'fusionGroupInfo',

Modified: sandbox/jxlib-3.0/widgets/Print/Print.html
===================================================================
--- sandbox/jxlib-3.0/widgets/Print/Print.html	2009-11-17 16:47:42 UTC (rev 1981)
+++ sandbox/jxlib-3.0/widgets/Print/Print.html	2009-11-17 16:48:54 UTC (rev 1982)
@@ -1,4 +1,4 @@
-<div class="PrintDialogForm">
+<div class="PrintDialogForm">
   <fieldset class="PrintDialogOptions">
 	  <legend>Options</legend>
 	  	<label class="block" for="dialogPrintShowtitle"><input name="dialogPrintShowtitle" id="dialogPrintShowtitle" type="checkbox" value="showtitle" checked>

Modified: sandbox/jxlib-3.0/widgets/Query/classes/query.php
===================================================================
--- sandbox/jxlib-3.0/widgets/Query/classes/query.php	2009-11-17 16:47:42 UTC (rev 1981)
+++ sandbox/jxlib-3.0/widgets/Query/classes/query.php	2009-11-17 16:48:54 UTC (rev 1982)
@@ -209,8 +209,9 @@
         $featureService = $this->site->CreateService(MgServiceType::FeatureService);
         $resId = new MgResourceIdentifier($layer->GetFeatureSourceId());
         $featureClass = $layer->GetFeatureClassName();
+        $filter = $layer->GetFilter();
         $featureGeometry = $layer->GetFeatureGeometryName();
-
+        
         // Initialize the coordinate system transform
 
         $schemaAndClass = explode(":", $featureClass);
@@ -240,6 +241,7 @@
         $queryMax = (int) $this->args['QUERYMAX'];
         $queryOptions = new MgFeatureQueryOptions();
 
+        $propertyFilter = '';
         if ($this->args['USEPROPERTYFILTER'] == 'true')
         {
             $propertyFilter = $this->args['PROPERTYNAME'];
@@ -247,10 +249,18 @@
                 $propertyFilter .= sprintf($this->strExpressions[$this->args['OPERATOR']], $this->args['VALUE']);
             else
                 $propertyFilter .= sprintf($this->numExpressions[$this->args['OPERATOR']], $this->args['VALUE']);
-
+                
+            if($filter != '')
+                $propertyFilter = $propertyFilter . ' AND (' . $filter . ')';
+        }
+        else
+        {
+            if($filter != '')
+                $propertyFilter = $filter;
+        }
+        if($propertyFilter != '')
             $queryOptions->SetFilter($propertyFilter);
-        }
-
+        
         if ($this->args['USESPATIALFILTER'] == 'true')
         {
             $polygon = $this->CreatePolygonFromGeomText($this->args['GEOMTEXT']);

Modified: sandbox/jxlib-3.0/widgets/Query/querymain.php
===================================================================
--- sandbox/jxlib-3.0/widgets/Query/querymain.php	2009-11-17 16:47:42 UTC (rev 1981)
+++ sandbox/jxlib-3.0/widgets/Query/querymain.php	2009-11-17 16:48:54 UTC (rev 1982)
@@ -140,6 +140,9 @@
             {
                 ToggleSpatialFilter(document.getElementById("spatialFilter").checked);
             }
+            
+            if(document.getElementById("spatialFilter").checked == false)
+                ClearDigitization();
         }
 
         function OnDigitizeRectangle()

Modified: sandbox/jxlib-3.0/widgets/TaskPane/TaskPane.html
===================================================================
--- sandbox/jxlib-3.0/widgets/TaskPane/TaskPane.html	2009-11-17 16:47:42 UTC (rev 1981)
+++ sandbox/jxlib-3.0/widgets/TaskPane/TaskPane.html	2009-11-17 16:48:54 UTC (rev 1982)
@@ -1,4 +1,4 @@
-<html>
+<html>
 <head>
 <style type="text/css">
     @import url(TaskPane.css);

Modified: sandbox/jxlib-3.0/widgets/Theme/classes/theme.php
===================================================================
--- sandbox/jxlib-3.0/widgets/Theme/classes/theme.php	2009-11-17 16:47:42 UTC (rev 1981)
+++ sandbox/jxlib-3.0/widgets/Theme/classes/theme.php	2009-11-17 16:48:54 UTC (rev 1982)
@@ -231,7 +231,7 @@
 
         $vectorScaleRangecElement = $nodeList->item($this->args['SCALERANGEINDEX']);
         $areaTypeStyle = $vectorScaleRangecElement->getElementsByTagName('AreaTypeStyle')->item(0);
-
+        
         // Remove any existing <AreaRule> elements.
 
         $areaRuleList = $areaTypeStyle->getElementsByTagName('AreaRule');
@@ -241,6 +241,11 @@
             $areaTypeStyle->removeChild($areaRuleList->item(0));
         }
 
+        $hasChild = $areaTypeStyle->hasChildNodes();
+        if($hasChild)
+        {
+          $element = $areaTypeStyle->childNodes->item(0);
+        }
 
         // Now create the new <AreaRule> elements.
 
@@ -255,7 +260,7 @@
             $aggregateOptions->AddFeatureProperty($this->args['PROPERTYNAME']);
             $aggregateOptions->SelectDistinct(true);
 
-            $dataReader = $featureService->SelectAggregate($resId, $layer->GetFeatureClassName(), $aggregateOptions);
+            $dataReader = $featureService->SelectAggregate($resId, $layer->GetFeatureClassName(), $aggregateOptions);            
             while ($dataReader->ReadNext())
             {
                 $value = $this->GetFeaturePropertyValue($dataReader, $this->args['PROPERTYNAME']);
@@ -274,7 +279,14 @@
 
                 $areaDoc = DOMDocument::loadXML($areaRuleXML);
                 $areaNode = $doc->importNode($areaDoc->documentElement, true);
-                $areaTypeStyle->appendChild($areaNode);
+                if($hasChild)
+                {
+                  $areaTypeStyle->insertBefore($areaNode, $element);
+                }
+                else
+                {
+                  $areaTypeStyle->appendChild($areaNode);
+                }
 
                 $portion += $increment;
             }
@@ -311,7 +323,14 @@
 
                 $areaDoc = DOMDocument::loadXML($areaRuleXML);
                 $areaNode = $doc->importNode($areaDoc->documentElement, true);
-                $areaTypeStyle->appendChild($areaNode);
+                if($hasChild)
+                {
+                   $areaTypeStyle->insertBefore($areaNode, $element);
+                }
+                else
+                {
+                   $areaTypeStyle->appendChild($areaNode);
+                }
 
                 $portion += $increment;
             }



More information about the fusion-commits mailing list