[mapguide-commits] r7835 - trunk/MgDev/Web/src/viewerfiles

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Mon Sep 2 22:18:02 PDT 2013


Author: hubu
Date: 2013-09-02 22:18:02 -0700 (Mon, 02 Sep 2013)
New Revision: 7835

Modified:
   trunk/MgDev/Web/src/viewerfiles/ajaxmappane.templ
Log:
Submit on behalf of Andy Zhang.

Add null check for layer.featIds.
 

Modified: trunk/MgDev/Web/src/viewerfiles/ajaxmappane.templ
===================================================================
--- trunk/MgDev/Web/src/viewerfiles/ajaxmappane.templ	2013-09-03 05:16:20 UTC (rev 7834)
+++ trunk/MgDev/Web/src/viewerfiles/ajaxmappane.templ	2013-09-03 05:18:02 UTC (rev 7835)
@@ -3215,8 +3215,10 @@
             xmlSelection = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<FeatureSet>\n";
             for(var layerId in selection.layers.items)
             {
+                var layer = selection.layers.getItem(layerId);
+                if (!layer.featIds)
+                    continue;
                 xmlSelection += "<Layer id=\"" + layerId + "\">\n";
-                var layer = selection.layers.getItem(layerId);
                 xmlSelection += "<Class id=\"" + layer.className + "\">\n";
                 for(var id in layer.featIds.items)
                     xmlSelection += "<ID>" +  id + "</ID>\n";



More information about the mapguide-commits mailing list