[mapguide-commits] r7834 - sandbox/adsk/2.4j/Web/src/viewerfiles

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Mon Sep 2 22:16:20 PDT 2013


Author: hubu
Date: 2013-09-02 22:16:20 -0700 (Mon, 02 Sep 2013)
New Revision: 7834

Modified:
   sandbox/adsk/2.4j/Web/src/viewerfiles/ajaxmappane.templ
Log:
Submit on behalf of Andy Zhang

Add null check for layer.featIds.


Modified: sandbox/adsk/2.4j/Web/src/viewerfiles/ajaxmappane.templ
===================================================================
--- sandbox/adsk/2.4j/Web/src/viewerfiles/ajaxmappane.templ	2013-09-03 05:01:50 UTC (rev 7833)
+++ sandbox/adsk/2.4j/Web/src/viewerfiles/ajaxmappane.templ	2013-09-03 05:16:20 UTC (rev 7834)
@@ -3147,8 +3147,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