[mapguide-commits] r8620 - in branches/2.6/MgDev: . Common/MapGuideCommon/Controller Server/src/Services/Feature Web/src/viewerfiles

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Thu Apr 2 05:06:45 PDT 2015


Author: jng
Date: 2015-04-02 05:06:45 -0700 (Thu, 02 Apr 2015)
New Revision: 8620

Modified:
   branches/2.6/MgDev/
   branches/2.6/MgDev/Common/MapGuideCommon/Controller/HtmlController.cpp
   branches/2.6/MgDev/Server/src/Services/Feature/ServerFeatureUtil.cpp
   branches/2.6/MgDev/Web/src/viewerfiles/
   branches/2.6/MgDev/Web/src/viewerfiles/ajaxmappane.templ
Log:
Merged revision(s) 8616-8618 from trunk/MgDev:
Merged revision(s) 8563 from sandbox/adsk/3.0m:
#2547: Attribute values are wrong in Selection Panel if feature source is joined.
http://trac.osgeo.org/mapguide/ticket/2547, submit on behalf of Andy Zhang.

In selection panel, the order of attribute names is from 'LayerMetaData', which is same as the order of layer's property mappings. But the order of values is same as the order of properties in class definition. They are same in most cases. However, they may be different if feature source is joined or a view.

Now we use the order of properties in class definition for both cases. 

........

........
Merged revision(s) 8584 from sandbox/adsk/3.0m:
#2551,Zoom in/out raster file (sid file) in flexible web layout results in server down.
http://trac.osgeo.org/mapguide/ticket/2551, submit on behalf of Andy Zhang.

For raster data sources, the property exists only when the data model type is FdoRasterDataModelType_Palette. But we call the GetProperty(L"Palette") when bits of pixel is 8. So for some raster files, FdoCommandException will be thrown several times, which results in Server unstable. Now we add a check of the data model type to fix the issue. 
........

........
Merged revision(s) 8607 from sandbox/adsk/3.0m:
Fix Ticket #2552: Zoom slider not available in IE 10 with basic layout and without compatibility mode.

Submit on behalf of Andy Su.

The root case of the defect is that the feature DirectX-based Filters(filter:progid:DXImageTransform.Microsoft.AlphaImageLoader) has been removed from IE10?\226?\128?\153s Standards and Quirks modes. To fix the issue, use a standards-based alternative tag <img> to replace it. 
........

........



Property changes on: branches/2.6/MgDev
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/2.4/MgDev:6749-6756,6777-6783,6785-6787,6789,6791-6794,6796-6801,6954-6962,6986-7006
/sandbox/jng/createruntimemap:7486-7555
/sandbox/rfc94:5099-5163
/trunk/MgDev:8209-8210,8230,8313,8333,8359,8388,8392,8423,8433,8439,8443-8444,8518-8519,8567-8568,8571,8588-8589,8595
   + /branches/2.4/MgDev:6749-6756,6777-6783,6785-6787,6789,6791-6794,6796-6801,6954-6962,6986-7006
/sandbox/adsk/3.0m:8563,8584,8607
/sandbox/jng/createruntimemap:7486-7555
/sandbox/rfc94:5099-5163
/trunk/MgDev:8209-8210,8230,8313,8333,8359,8388,8392,8423,8433,8439,8443-8444,8518-8519,8567-8568,8571,8588-8589,8595,8616-8618

Modified: branches/2.6/MgDev/Common/MapGuideCommon/Controller/HtmlController.cpp
===================================================================
--- branches/2.6/MgDev/Common/MapGuideCommon/Controller/HtmlController.cpp	2015-04-02 12:05:28 UTC (rev 8619)
+++ branches/2.6/MgDev/Common/MapGuideCommon/Controller/HtmlController.cpp	2015-04-02 12:06:45 UTC (rev 8620)
@@ -486,37 +486,41 @@
                     MdfModel::NameStringPairCollection* pmappings = vl->GetPropertyMappings();
                     for (int j=0; j<pmappings->GetCount(); j++)
                     {
-                        STRING pTypeStr;
                         MdfModel::NameStringPair* m = pmappings->GetAt(j);
                         propNames->Add(m->GetName());
                         displayNameMap.insert(std::make_pair(m->GetName(), m->GetValue()));
-                        INT32 pidx = clsProps->IndexOf(m->GetName());
-                        if (pidx >= 0)
+                    }
+                    STRING pTypeStr;
+                    for (int k = 0; k < clsProps->GetCount(); k++)
+                    {
+                        Ptr<MgPropertyDefinition> propDef = clsProps->GetItem(k);
+                        STRING propName = propDef->GetName();
+                        DisplayNameMap::iterator it = displayNameMap.find(propName);
+                        //Skip properties without display mappings
+                        if (it == displayNameMap.end())
+                            continue;
+                        INT32 pdType = propDef->GetPropertyType();
+                        INT32 pType = MgPropertyType::Null;
+                        if (pdType == MgFeaturePropertyType::DataProperty)
                         {
-                            Ptr<MgPropertyDefinition> propDef = clsProps->GetItem(pidx);
-                            INT32 pdType = propDef->GetPropertyType();
-                            INT32 pType = MgPropertyType::Null;
-                            if (pdType == MgFeaturePropertyType::DataProperty)
-                            {
-                                pType = ((MgDataPropertyDefinition*)propDef.p)->GetDataType();
-                            }
-                            else if (pdType == MgFeaturePropertyType::GeometricProperty)
-                            {
-                                pType = MgPropertyType::Geometry;
-                            }
-                            MgUtil::Int32ToString(pType, pTypeStr);
-                            xmlOut.append(L"<Property>\n");
-                            xmlOut.append(L"<Name>");
-                            xmlOut.append(m->GetName());
-                            xmlOut.append(L"</Name>\n");
-                            xmlOut.append(L"<Type>");
-                            xmlOut.append(pTypeStr);
-                            xmlOut.append(L"</Type>\n");
-                            xmlOut.append(L"<DisplayName>");
-                            xmlOut.append(m->GetValue());
-                            xmlOut.append(L"</DisplayName>\n");
-                            xmlOut.append(L"</Property>\n");
+                            pType = ((MgDataPropertyDefinition*)propDef.p)->GetDataType();
                         }
+                        else if (pdType == MgFeaturePropertyType::GeometricProperty)
+                        {
+                            pType = MgPropertyType::Geometry;
+                        }
+                        MgUtil::Int32ToString(pType, pTypeStr);
+                        xmlOut.append(L"<Property>\n");
+                        xmlOut.append(L"<Name>");
+                        xmlOut.append(it->first);
+                        xmlOut.append(L"</Name>\n");
+                        xmlOut.append(L"<Type>");
+                        xmlOut.append(pTypeStr);
+                        xmlOut.append(L"</Type>\n");
+                        xmlOut.append(L"<DisplayName>");
+                        xmlOut.append(it->second);
+                        xmlOut.append(L"</DisplayName>\n");
+                        xmlOut.append(L"</Property>\n");
                     }
                 }
             }

Modified: branches/2.6/MgDev/Server/src/Services/Feature/ServerFeatureUtil.cpp
===================================================================
--- branches/2.6/MgDev/Server/src/Services/Feature/ServerFeatureUtil.cpp	2015-04-02 12:05:28 UTC (rev 8619)
+++ branches/2.6/MgDev/Server/src/Services/Feature/ServerFeatureUtil.cpp	2015-04-02 12:06:45 UTC (rev 8620)
@@ -20,6 +20,7 @@
 #include "ServerDataReaderPool.h"
 #include "ServerFeatureReaderPool.h"
 #include "ByteSourceRasterStreamImpl.h"
+#include "Fdo/Raster/RasterDataModelType.h"
 
 static std::map<FdoPropertyType, INT32>                 s_FdoPropertyType;
 static std::map<FdoDataType, INT32>                     s_FeatureUtilFdoDataType;
@@ -485,8 +486,8 @@
             retVal->SetBitsPerPixel(dm->GetBitsPerPixel());
             retVal->SetDataModelType(dm->GetDataModelType());
 
-            //if image is color mapped, get the palette
-            if (dm->GetBitsPerPixel() == 8)
+            //if data model type is Palette and image is color mapped, get the palette
+            if (dm->GetDataModelType() == FdoRasterDataModelType_Palette && dm->GetBitsPerPixel() == 8)
             {
                 //try to get the palette -- if there isn't one,
                 //an exception will be thrown. It's simpler to catch


Property changes on: branches/2.6/MgDev/Server/src/Services/Feature/ServerFeatureUtil.cpp
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/2.4/MgDev/Server/src/Services/Feature/ServerFeatureUtil.cpp:6738-6741,6749-6756,6777-6783,6785-6787,6789,6791-6794,6796-6801,6954-6962,6986-7006
/sandbox/adsk/2.4j/Server/src/Services/Feature/ServerFeatureUtil.cpp:6327-6481
/sandbox/jng/createruntimemap/Server/src/Services/Feature/ServerFeatureUtil.cpp:7486-7555
/sandbox/rfc94/Server/src/Services/Feature/ServerFeatureUtil.cpp:5099-5163
/trunk/MgDev/Server/src/Services/Feature/ServerFeatureUtil.cpp:6250-6326
   + /branches/2.4/MgDev/Server/src/Services/Feature/ServerFeatureUtil.cpp:6738-6741,6749-6756,6777-6783,6785-6787,6789,6791-6794,6796-6801,6954-6962,6986-7006
/sandbox/adsk/2.4j/Server/src/Services/Feature/ServerFeatureUtil.cpp:6327-6481
/sandbox/adsk/3.0m/Server/src/Services/Feature/ServerFeatureUtil.cpp:8584
/sandbox/jng/createruntimemap/Server/src/Services/Feature/ServerFeatureUtil.cpp:7486-7555
/sandbox/rfc94/Server/src/Services/Feature/ServerFeatureUtil.cpp:5099-5163
/trunk/MgDev/Server/src/Services/Feature/ServerFeatureUtil.cpp:8616-8618


Property changes on: branches/2.6/MgDev/Web/src/viewerfiles
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/2.4/MgDev/Web/src/viewerfiles:6738-6741,6749-6756,6777-6783,6785-6787,6789,6791-6794,6796-6801,6954-6962,6986-7006
/sandbox/adsk/2.2gp/Web/src/viewerfiles:5392
/sandbox/jng/createruntimemap/Web/src/viewerfiles:7486-7555
/trunk/MgDev/Web/src/viewerfiles:8313
   + /branches/2.4/MgDev/Web/src/viewerfiles:6738-6741,6749-6756,6777-6783,6785-6787,6789,6791-6794,6796-6801,6954-6962,6986-7006
/sandbox/adsk/2.2gp/Web/src/viewerfiles:5392
/sandbox/adsk/3.0m/Web/src/viewerfiles:8607
/sandbox/jng/createruntimemap/Web/src/viewerfiles:7486-7555
/trunk/MgDev/Web/src/viewerfiles:8313,8616-8618

Modified: branches/2.6/MgDev/Web/src/viewerfiles/ajaxmappane.templ
===================================================================
--- branches/2.6/MgDev/Web/src/viewerfiles/ajaxmappane.templ	2015-04-02 12:05:28 UTC (rev 8619)
+++ branches/2.6/MgDev/Web/src/viewerfiles/ajaxmappane.templ	2015-04-02 12:06:45 UTC (rev 8620)
@@ -3960,7 +3960,14 @@
     if (img.parentElement.href) imgStyle = "cursor:pointer;" + imgStyle
     if (img.useMap)
         strAddMap = "<img style=\"position:absolute; left: 0px; top: 0px; height:" + img.height + "px; width:" + img.width + ";\" " + "src=\"" + strGif + "\" usemap=\"" + img.useMap  + "\" border=\"" + img.border + "\">";
-    var strNewHTML = "<span " + imgID + imgClass + imgTitle + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";" + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'" + img.src + "\', sizingMethod='crop');\"></span>"
+    //The feature DirectX-based Filters has been removed from IE10’s Standards and Quirks modes.
+    if (msie10plus)
+    {
+        var strSrcImg = "<img src=\'" + img.src +"\'>";
+        var strNewHTML = "<span " + imgID + imgClass + imgTitle + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";\"" + ">" + strSrcImg + "</span>";
+    }
+    else	
+        var strNewHTML = "<span " + imgID + imgClass + imgTitle + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";" + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'" + img.src + "\', sizingMethod='crop');\"></span>";
     if (img.useMap) strNewHTML += strAddMap
     img.outerHTML = strNewHTML
 }



More information about the mapguide-commits mailing list