[mapguide-commits] r7878 - trunk/Tools/Maestro/Maestro.Editors/Preview

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Mon Sep 30 05:00:40 PDT 2013


Author: jng
Date: 2013-09-30 05:00:40 -0700 (Mon, 30 Sep 2013)
New Revision: 7878

Modified:
   trunk/Tools/Maestro/Maestro.Editors/Preview/LocalMapPreviewer.cs
Log:
#2366: Fix resource id not being set during preview resource generation in local map preview mode.

Modified: trunk/Tools/Maestro/Maestro.Editors/Preview/LocalMapPreviewer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/Preview/LocalMapPreviewer.cs	2013-09-30 03:08:30 UTC (rev 7877)
+++ trunk/Tools/Maestro/Maestro.Editors/Preview/LocalMapPreviewer.cs	2013-09-30 12:00:40 UTC (rev 7878)
@@ -110,6 +110,16 @@
                             }
                             break;
                     }
+
+                    if (string.IsNullOrEmpty(previewMdf.ResourceID))
+                    {
+                        var sessionId = edSvc.SessionID;
+                        var mdfId = "Session:" + sessionId + "//" + Guid.NewGuid() + ".MapDefinition"; //NOXLATE
+
+                        conn.ResourceService.SaveResourceAs(previewMdf, mdfId);
+                        previewMdf.ResourceID = mdfId;
+                    }
+
                     if (previewMdf != null)
                         return mapSvc.CreateMap(previewMdf);
                     else



More information about the mapguide-commits mailing list