[mapguide-commits] r8455 - trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Http

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Thu Nov 20 17:30:19 PST 2014


Author: jng
Date: 2014-11-20 17:30:19 -0800 (Thu, 20 Nov 2014)
New Revision: 8455

Modified:
   trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Http/HttpResourcePreviewUrlGenerator.cs
Log:
Turn off debug watermarks when previewing watermarks

Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Http/HttpResourcePreviewUrlGenerator.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Http/HttpResourcePreviewUrlGenerator.cs	2014-11-21 01:27:04 UTC (rev 8454)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Http/HttpResourcePreviewUrlGenerator.cs	2014-11-21 01:30:19 UTC (rev 8455)
@@ -49,7 +49,7 @@
                 throw new InvalidOperationException(Strings.SiteVersionDoesntSupportWatermarks);
 
             IMapDefinition2 map = Utility.CreateWatermarkPreviewMapDefinition(wmd);
-            return GenerateMapPreviewUrl(map, locale, isNew, sessionID);
+            return _GenerateMapPreviewUrl(map, locale, isNew, sessionID, false);
         }
 
         protected string GetRootUrl()
@@ -79,7 +79,7 @@
             return url;
         }
 
-        protected override string GenerateMapPreviewUrl(Resource.IResource res, string locale, bool isNew, string sessionID)
+        private string _GenerateMapPreviewUrl(Resource.IResource res, string locale, bool isNew, string sessionID, bool addDebugWatermark)
         {
             string url = GetRootUrl();
 
@@ -89,7 +89,7 @@
             if (mdf != null)
             {
                 IMapDefinition2 mdf2 = mdf as IMapDefinition2;
-                if (mdf2 != null && this.AddDebugWatermark)
+                if (mdf2 != null && addDebugWatermark)
                     CreateDebugWatermark(mdf2, conn, null);
             }
             conn.ResourceService.SaveResourceAs(res, mdfId);
@@ -122,6 +122,11 @@
             return url;
         }
 
+        protected override string GenerateMapPreviewUrl(Resource.IResource res, string locale, bool isNew, string sessionID)
+        {
+            return _GenerateMapPreviewUrl(res, locale, isNew, sessionID, this.AddDebugWatermark);
+        }
+
         private IMapDefinition CreateLayerPreviewMapDefinition(ILayerDefinition ldf, string sessionId, string layerName, IServerConnection conn)
         {
             //Create temp map definition to house our current layer



More information about the mapguide-commits mailing list