[mapguide-commits] r9487 - in trunk/MgDev: . Common/Stylization Server/src/Services/Rendering
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Wed Mar 27 08:26:10 PDT 2019
Author: jng
Date: 2019-03-27 08:26:10 -0700 (Wed, 27 Mar 2019)
New Revision: 9487
Modified:
trunk/MgDev/
trunk/MgDev/Common/Stylization/StylizationEngine.cpp
trunk/MgDev/Server/src/Services/Rendering/ServerRenderingService.cpp
Log:
Merged revision(s) 9486 from sandbox/adsk/3.1n:
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.
........
Index: trunk/MgDev
===================================================================
--- trunk/MgDev 2019-03-27 06:40:56 UTC (rev 9486)
+++ trunk/MgDev 2019-03-27 15:26:10 UTC (rev 9487)
Property changes on: trunk/MgDev
___________________________________________________________________
Modified: svn:mergeinfo
## -5,7 +5,7 ##
/sandbox/VC140:8684-8759
/sandbox/adsk/2.6l:8727
/sandbox/adsk/3.0m:8563,8584,8607,8625,8694-8695
-/sandbox/adsk/3.1n:8871,8895,8901,8912-8913,8921-8922,8942,9019-9020
+/sandbox/adsk/3.1n:8871,8895,8901,8912-8913,8921-8922,8942,9019-9020,9486
/sandbox/adsk/3.2o.AIMS:9135-9140,9146
/sandbox/adsk/3.2p:9254
/sandbox/jng/clean_json:8818-9180
Modified: trunk/MgDev/Common/Stylization/StylizationEngine.cpp
===================================================================
--- trunk/MgDev/Common/Stylization/StylizationEngine.cpp 2019-03-27 06:40:56 UTC (rev 9486)
+++ trunk/MgDev/Common/Stylization/StylizationEngine.cpp 2019-03-27 15:26:10 UTC (rev 9487)
@@ -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: trunk/MgDev/Server/src/Services/Rendering/ServerRenderingService.cpp
===================================================================
--- trunk/MgDev/Server/src/Services/Rendering/ServerRenderingService.cpp 2019-03-27 06:40:56 UTC (rev 9486)
+++ trunk/MgDev/Server/src/Services/Rendering/ServerRenderingService.cpp 2019-03-27 15:26:10 UTC (rev 9487)
@@ -1022,7 +1022,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