[mapguide-commits] r1067 - in trunk/MgDev: Server/src/Services/Tile Web/src/HttpHandler

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Tue Jan 23 19:02:11 EST 2007


Author: stevedang
Date: 2007-01-23 19:02:10 -0500 (Tue, 23 Jan 2007)
New Revision: 1067

Modified:
   trunk/MgDev/Server/src/Services/Tile/ServerTileService.cpp
   trunk/MgDev/Web/src/HttpHandler/HttpGetTileImage.cpp
   trunk/MgDev/Web/src/HttpHandler/HttpGetTileImage.h
   trunk/MgDev/Web/src/HttpHandler/OgcFramework.h
Log:
Miscellaneous code cleanups and fixes:
- Updated HTTP GetTile request to replace scale (double) with scale index (INT32).
- Commented out unused OGC framework parameters (due to Insure++ errors on Linux).
- Got rid of some compiling warnings in Server Tile Service.


Modified: trunk/MgDev/Server/src/Services/Tile/ServerTileService.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Tile/ServerTileService.cpp	2007-01-23 00:03:19 UTC (rev 1066)
+++ trunk/MgDev/Server/src/Services/Tile/ServerTileService.cpp	2007-01-24 00:02:10 UTC (rev 1067)
@@ -119,7 +119,7 @@
                 cachedMap = new MgMemoryStreamHelper();
                 Ptr<MgStream> stream = new MgStream(cachedMap);
                 map->Serialize(stream);
-                if (sm_mapCache.size() > sm_mapCacheSize)
+                if ((INT32)sm_mapCache.size() > sm_mapCacheSize)
                 {
                     ClearMapCache(L"");
                 }

Modified: trunk/MgDev/Web/src/HttpHandler/HttpGetTileImage.cpp
===================================================================
--- trunk/MgDev/Web/src/HttpHandler/HttpGetTileImage.cpp	2007-01-23 00:03:19 UTC (rev 1066)
+++ trunk/MgDev/Web/src/HttpHandler/HttpGetTileImage.cpp	2007-01-24 00:02:10 UTC (rev 1067)
@@ -78,8 +78,8 @@
         // Get the tile row index and convert to integer
         m_tileRow = MgUtil::StringToInt32(params->GetParameterValue(MgHttpResourceStrings::reqRenderingTileRow));
 
-        // Get the scale and convert to double
-        m_scale = MgUtil::StringToDouble(params->GetParameterValue(MgHttpResourceStrings::reqRenderingScaleIndex));
+        // Get the scale index and convert to integer
+        m_scaleIndex = MgUtil::StringToInt32(params->GetParameterValue(MgHttpResourceStrings::reqRenderingScaleIndex));
     }
     else
     {
@@ -140,7 +140,7 @@
         Ptr<MgTileService> service = (MgTileService*)(CreateService(MgServiceType::TileService));
 
         // Call the C++ API
-        Ptr<MgByteReader> tileImage = service->GetTile(resId, m_baseMapLayerGroupName, m_tileCol, m_tileRow, m_scale);
+        Ptr<MgByteReader> tileImage = service->GetTile(resId, m_baseMapLayerGroupName, m_tileCol, m_tileRow, m_scaleIndex);
 
         // Set the result
         hResult->SetResultObject(tileImage, tileImage->GetMimeType());

Modified: trunk/MgDev/Web/src/HttpHandler/HttpGetTileImage.h
===================================================================
--- trunk/MgDev/Web/src/HttpHandler/HttpGetTileImage.h	2007-01-23 00:03:19 UTC (rev 1066)
+++ trunk/MgDev/Web/src/HttpHandler/HttpGetTileImage.h	2007-01-24 00:02:10 UTC (rev 1067)
@@ -65,7 +65,7 @@
     INT32   m_tileCol;
     INT32   m_tileRow;
     STRING  m_version;
-    double  m_scale;
+    INT32   m_scaleIndex;
 };
 
 #endif  // _FS_GET_TILE_IMAGE_H

Modified: trunk/MgDev/Web/src/HttpHandler/OgcFramework.h
===================================================================
--- trunk/MgDev/Web/src/HttpHandler/OgcFramework.h	2007-01-23 00:03:19 UTC (rev 1066)
+++ trunk/MgDev/Web/src/HttpHandler/OgcFramework.h	2007-01-24 00:02:10 UTC (rev 1067)
@@ -138,10 +138,10 @@
 extern CPSZ kpszAttributeRequest           ;// = _("request");
 extern CPSZ kpszAttributeVersion           ;// = _("version");
 
-extern CPSZ kpszAttrValueWms               ;// = _("WMS");
+//extern CPSZ kpszAttrValueWms               ;// = _("WMS");
 
 extern CPSZ kpszElementDefinitions         ;// = _("Definitions");
-extern CPSZ kpszAttributeFor               ;// = _("for");
+//extern CPSZ kpszAttributeFor               ;// = _("for");
 extern CPSZ kpszElementDefine              ;// = _("Define");
 extern CPSZ kpszAttributeItem              ;// = _("item");
 
@@ -164,6 +164,6 @@
 extern CPSZ kpszEmpty                      ;// = _("");
 extern CPSZ kpszDefaultExceptionTemplate   ;// = _("Server Exception:\nType: &Exception.Type;\nMessage: &Exception.Message;\n");
 //
-extern CPSZ kpszFilenameGlobalConfig       ;// = _("OgcWmsService.config");
+//extern CPSZ kpszFilenameGlobalConfig       ;// = _("OgcWmsService.config");
 
 #endif//_OgcFramework_h



More information about the mapguide-commits mailing list