[mapguide-commits] r9486 - in sandbox/adsk/3.1n: Common/Stylization Server/src/Services/Rendering
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Tue Mar 26 23:40:56 PDT 2019
Author: christinebao
Date: 2019-03-26 23:40:56 -0700 (Tue, 26 Mar 2019)
New Revision: 9486
Modified:
sandbox/adsk/3.1n/Common/Stylization/StylizationEngine.cpp
sandbox/adsk/3.1n/Server/src/Services/Rendering/ServerRenderingService.cpp
Log:
Expand extents when getting map.
One customer reports that the symbol/label is cut at edge of tile when using AIMS WMS service. Make 2 changes to fix the issue:
1. Set expandExtents to true when calling MgServerRenderingService::RenderMapInternal.
2. Because a label's width is longer than the width of a symbol, increase the clip offset if there is label in the symbol instance.
Modified: sandbox/adsk/3.1n/Common/Stylization/StylizationEngine.cpp
===================================================================
--- sandbox/adsk/3.1n/Common/Stylization/StylizationEngine.cpp 2019-03-24 09:20:11 UTC (rev 9485)
+++ sandbox/adsk/3.1n/Common/Stylization/StylizationEngine.cpp 2019-03-27 06:40:56 UTC (rev 9486)
@@ -1052,6 +1052,19 @@
{
double styleClipOffsetSU = GetClipOffset(sym, style, exec, mm2suX, mm2suY);
clipOffsetSU = rs_max(styleClipOffsetSU, clipOffsetSU);
+
+ // increase clip offset if there is text
+ size_t nPrimitives = style->symbol.size();
+ for (size_t primitiveIx = 0; primitiveIx < nPrimitives; ++primitiveIx)
+ {
+ SE_Primitive* primitive = style->symbol[primitiveIx];
+ SE_Text* textPri = dynamic_cast<SE_Text*>(primitive);
+ if (textPri != NULL)
+ {
+ clipOffsetSU *= 5;
+ break;
+ }
+ }
}
}
}
Modified: sandbox/adsk/3.1n/Server/src/Services/Rendering/ServerRenderingService.cpp
===================================================================
--- sandbox/adsk/3.1n/Server/src/Services/Rendering/ServerRenderingService.cpp 2019-03-24 09:20:11 UTC (rev 9485)
+++ sandbox/adsk/3.1n/Server/src/Services/Rendering/ServerRenderingService.cpp 2019-03-27 06:40:56 UTC (rev 9486)
@@ -823,7 +823,7 @@
auto_ptr<SE_Renderer> dr(CreateRenderer(drawWidth, drawHeight, bgcolor, false));
// call the internal helper API to do all the stylization overhead work
- ret = RenderMapInternal(map, selection, NULL, dr.get(), drawWidth, drawHeight, width, height, format, scale, b, false, bKeepSelection, true, NULL);
+ ret = RenderMapInternal(map, selection, NULL, dr.get(), drawWidth, drawHeight, width, height, format, scale, b, true, bKeepSelection, true, NULL);
MG_CATCH_AND_THROW(L"MgServerRenderingService.RenderMap")
More information about the mapguide-commits
mailing list