[mapguide-commits] r8615 - in branches/2.6/MgDev: . Common/MapGuideCommon/Controller Server/src/Services/Rendering

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Thu Apr 2 04:44:03 PDT 2015


Author: jng
Date: 2015-04-02 04:44:03 -0700 (Thu, 02 Apr 2015)
New Revision: 8615

Modified:
   branches/2.6/MgDev/
   branches/2.6/MgDev/Common/MapGuideCommon/Controller/HtmlController.cpp
   branches/2.6/MgDev/Server/src/Services/Rendering/ServerRenderingService.cpp
Log:
Merged revision(s) 8567, 8571 from trunk/MgDev:
#2548: Fix inability to clear selections by calling QUERYMAPFEATURES and omitting both GEOMETRY and FEATUREFILTER parameters. This condition previously resulted in a MgNullArgumentException from MgServerRenderingService::RenderForSelection() which is incorrect. The proper action for such a condition is to return immediately.

Reviewed by Walt Welton-Lair
........
#2526: Fix MgUnclassifiedException when doing a QUERYMAPFEATURES with PERSIST=0

Reviewed by Walt Welton-Lair
........



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,8568,8588-8589,8595
   + /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

Modified: branches/2.6/MgDev/Common/MapGuideCommon/Controller/HtmlController.cpp
===================================================================
--- branches/2.6/MgDev/Common/MapGuideCommon/Controller/HtmlController.cpp	2015-04-02 11:40:10 UTC (rev 8614)
+++ branches/2.6/MgDev/Common/MapGuideCommon/Controller/HtmlController.cpp	2015-04-02 11:44:03 UTC (rev 8615)
@@ -269,17 +269,26 @@
     // Call the C++ API, regardless of bitmask as any part of the mask will require information from this API
     featureInfo = service->QueryFeatures(map, layerNames, selectionGeometry, selectionVariant, featureFilter, maxFeatures, layerAttributeFilter);
 
+    Ptr<MgSelection> selection;
+    if (NULL != featureInfo.p)
+        selection = featureInfo->GetSelection();
+
+    bool bSetMap = true;
+    if (!selection)
+    {
+        selection = new MgSelection(map);
+        bSetMap = false;
+    }
+
     if (persist)
     {
         //save the selection set in the session repository
-        Ptr<MgSelection> selection;
-        if (NULL != featureInfo.p)
-            selection = featureInfo->GetSelection();
-        if(!selection)
-            selection = new MgSelection(map);
         selection->Save(resourceService, mapName);
-        newSelection = SAFE_ADDREF(selection.p);
+    }
+    newSelection = SAFE_ADDREF(selection.p);
 
+    if (bSetMap)
+    {   
         //Needed for GetLayers() to work below
         newSelection->SetMap(map);
     }

Modified: branches/2.6/MgDev/Server/src/Services/Rendering/ServerRenderingService.cpp
===================================================================
--- branches/2.6/MgDev/Server/src/Services/Rendering/ServerRenderingService.cpp	2015-04-02 11:40:10 UTC (rev 8614)
+++ branches/2.6/MgDev/Server/src/Services/Rendering/ServerRenderingService.cpp	2015-04-02 11:44:03 UTC (rev 8615)
@@ -1183,9 +1183,12 @@
     MG_TRY()
 
     ACE_DEBUG ((LM_DEBUG, ACE_TEXT("(%t) RenderForSelection(): ** START **\n")));
-    if (NULL == map || (NULL == geometry && featureFilter.empty()))
-        throw new MgNullArgumentException(L"MgServerRenderingService.RenderForSelection", __LINE__, __WFILE__, NULL, L"", NULL);
+    CHECKARGUMENTNULL(map, L"MgServerRenderingService.RenderForSelection");
 
+    //No geometry or selection XML = nothing to do.
+    if (geometry == NULL && featureFilter.empty())
+        return;
+
     if (maxFeatures < 0)
     {
         STRING buffer;



More information about the mapguide-commits mailing list