[mapguide-commits] r9633 - sandbox/jng/312_hardening/Web/src/viewerfiles

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Wed Nov 13 03:23:07 PST 2019


Author: jng
Date: 2019-11-13 03:23:07 -0800 (Wed, 13 Nov 2019)
New Revision: 9633

Modified:
   sandbox/jng/312_hardening/Web/src/viewerfiles/ajaxmappane.templ
Log:
AJAX viewer update to gracefully handle absence of selected feature bounds

Modified: sandbox/jng/312_hardening/Web/src/viewerfiles/ajaxmappane.templ
===================================================================
--- sandbox/jng/312_hardening/Web/src/viewerfiles/ajaxmappane.templ	2019-11-13 09:34:05 UTC (rev 9632)
+++ sandbox/jng/312_hardening/Web/src/viewerfiles/ajaxmappane.templ	2019-11-13 11:23:07 UTC (rev 9633)
@@ -4243,9 +4243,11 @@
             var feat = { /* INTERNAL_API */ selKey: ((msie && !msie10plus) ? selFeatEls[j].text : selFeatEls[j].textContent), values: [] };
             var featEl = featEls[j];
             var bounds = featEl.getElementsByTagName("Bounds")[0];
-            var bbox = ((msie && !msie10plus) ? bounds.text : bounds.textContent).split(" ");
-            feat.zoom = { minx: parseFloat(bbox[0]), miny: parseFloat(bbox[1]), maxx: parseFloat(bbox[2]), maxy: parseFloat(bbox[3]) };
-            
+            if (bounds)
+            {
+                var bbox = ((msie && !msie10plus) ? bounds.text : bounds.textContent).split(" ");
+                feat.zoom = { minx: parseFloat(bbox[0]), miny: parseFloat(bbox[1]), maxx: parseFloat(bbox[2]), maxy: parseFloat(bbox[3]) };
+            }
             var featVals = [];
             var propEls = featEl.getElementsByTagName("Property");
             for (var k = 0; k < propEls.length; k++)



More information about the mapguide-commits mailing list