[mapguide-commits] r4546 - trunk/MgDev/Common/MapGuideCommon/MapLayer

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Thu Jan 21 15:15:18 EST 2010


Author: chrisclaydon
Date: 2010-01-21 15:15:15 -0500 (Thu, 21 Jan 2010)
New Revision: 4546

Modified:
   trunk/MgDev/Common/MapGuideCommon/MapLayer/Map.cpp
Log:
Fixes #1241 - Selection not displayed in basic or flexible layouts for tiled maps

Modified: trunk/MgDev/Common/MapGuideCommon/MapLayer/Map.cpp
===================================================================
--- trunk/MgDev/Common/MapGuideCommon/MapLayer/Map.cpp	2010-01-21 18:58:51 UTC (rev 4545)
+++ trunk/MgDev/Common/MapGuideCommon/MapLayer/Map.cpp	2010-01-21 20:15:15 UTC (rev 4546)
@@ -328,21 +328,6 @@
                 rtLayer->SetGroup(itKg->second);
             }
         }
-
-        Ptr<MgSiteConnection> siteConn;
-        if (m_siteConnection.p != NULL)
-        {
-            siteConn = SAFE_ADDREF((MgSiteConnection*)m_siteConnection);
-        }
-        else
-        {
-            Ptr<MgUserInformation> userInfo = m_resourceService->GetUserInfo();
-            siteConn = new MgSiteConnection();
-            siteConn->Open(userInfo);
-        }
-        Ptr<MgFeatureService> featureService = dynamic_cast<MgFeatureService*>(siteConn->CreateService(MgServiceType::FeatureService));
-
-        BulkLoadIdentityProperties(featureService);
     }
 
     //done with this list
@@ -410,6 +395,22 @@
         }
     }
 
+    // Now that we've added all the layers (dynamic and base map) to the m_layers collection,
+	// bulk load the identity properties for all layers
+	Ptr<MgSiteConnection> siteConn;
+    if (m_siteConnection.p != NULL)
+    {
+        siteConn = SAFE_ADDREF((MgSiteConnection*)m_siteConnection);
+    }
+    else
+    {
+        Ptr<MgUserInformation> userInfo = m_resourceService->GetUserInfo();
+        siteConn = new MgSiteConnection();
+        siteConn->Open(userInfo);
+    }
+    Ptr<MgFeatureService> featureService = dynamic_cast<MgFeatureService*>(siteConn->CreateService(MgServiceType::FeatureService));
+    BulkLoadIdentityProperties(featureService);
+
     // build the sorted list of finite display scales
     SORTEDSCALES sortedScales;
     DisplayScaleCollection* displayScales = mdef->GetFiniteDisplayScales();



More information about the mapguide-commits mailing list