[mapguide-commits] r9542 - in sandbox/jng/tiling_v3: Common/MapGuideCommon/MapLayer Common/Schema Server/src/Services/Mapping Server/src/UnitTesting
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Tue Jun 11 06:29:07 PDT 2019
Author: jng
Date: 2019-06-11 06:29:07 -0700 (Tue, 11 Jun 2019)
New Revision: 9542
Modified:
sandbox/jng/tiling_v3/Common/MapGuideCommon/MapLayer/Map.cpp
sandbox/jng/tiling_v3/Common/MapGuideCommon/MapLayer/Map.h
sandbox/jng/tiling_v3/Common/Schema/RuntimeMap-4.0.0.xsd
sandbox/jng/tiling_v3/Server/src/Services/Mapping/ServerMappingService.cpp
sandbox/jng/tiling_v3/Server/src/UnitTesting/TestMappingService.cpp
sandbox/jng/tiling_v3/Server/src/UnitTesting/TestMappingService.h
Log:
Remove the default tile provider restriction on creating runtime maps. This means we now allow CREATERUNTIMEMAP to work against XYZ tile sets or Map Definitions that link to XYZ tile sets.
With this restriction removed, the RuntimeMap-4.0.0.xsd now has the following changes:
- MapDefinition is now optional (not being set if created from a XYZ tile set)
- Include tile format (to avoid a secondary resource lookup for the tile set to get this information)
Parameterize the CreateRuntimeMap unit tests to exercise creation at various supported schema versions.
Modified: sandbox/jng/tiling_v3/Common/MapGuideCommon/MapLayer/Map.cpp
===================================================================
--- sandbox/jng/tiling_v3/Common/MapGuideCommon/MapLayer/Map.cpp 2019-06-10 15:23:36 UTC (rev 9541)
+++ sandbox/jng/tiling_v3/Common/MapGuideCommon/MapLayer/Map.cpp 2019-06-11 13:29:07 UTC (rev 9542)
@@ -58,7 +58,8 @@
m_unpackedLayersGroups(false),
m_colorPalette(NULL), // lazy instantiation
m_watermarkUsage(Viewer),
- m_tileSetId((MgResourceIdentifier*)NULL)
+ m_tileSetId((MgResourceIdentifier*)NULL),
+ m_tilePixelRatio(1)
{
CHECKARGUMENTNULL(siteConnection, L"MgMap.MgMap");
@@ -227,6 +228,10 @@
{
m_tilePixelRatio = MgUtil::StringToInt32(nvp->GetValue());
}
+ else if (nvp->GetName() == MG_TILE_PROVIDER_COMMON_PARAM_TILEFORMAT)
+ {
+ m_tileFormat = nvp->GetValue();
+ }
}
//If tile CS is not the same as map def CS, then the bounds of the map def need to be transformed
@@ -645,6 +650,10 @@
{
m_tilePixelRatio = MgUtil::StringToInt32(nvp->GetValue());
}
+ else if (nvp->GetName() == MG_TILE_PROVIDER_COMMON_PARAM_TILEFORMAT)
+ {
+ m_tileFormat = nvp->GetValue();
+ }
}
MgGeometryFactory gf;
@@ -877,12 +886,6 @@
}
}
}
- else if (strict)
- {
- MgStringCollection args;
- args.Add(storeParams->GetTileProvider());
- throw new MgUnsupportedTileProviderException(L"MgMap.GetFiniteDisplayScalesFromTileSet", __LINE__, __WFILE__, &args, L"", NULL);
- }
}
//////////////////////////////////////////////////////////////
@@ -1329,6 +1332,15 @@
//tile set definition
stream->WriteObject(m_tileSetId);
+ //tile set provider
+ stream->WriteString(m_tileSetProvider);
+
+ //tile format
+ stream->WriteString(m_tileFormat);
+
+ //tile pixel ratio
+ stream->WriteInt32(m_tilePixelRatio);
+
// Serialize Layers and Groups as a blob.
if (m_inSave)
{
@@ -1453,6 +1465,15 @@
//tile set definition
m_tileSetId = (MgResourceIdentifier*)stream->GetObject();
+ //tile set provider
+ stream->GetString(m_tileSetProvider);
+
+ //tile format
+ stream->GetString(m_tileFormat);
+
+ //tile pixel ratio
+ stream->GetInt32(m_tilePixelRatio);
+
//blob for layers and groups
INT32 nBytes = 0;
streamReader->GetInt32(nBytes);
@@ -1644,6 +1665,11 @@
return m_tileSetProvider;
}
+STRING MgMap::GetTileFormat()
+{
+ return m_tileFormat;
+}
+
INT32 MgMap::GetTilePixelRatio()
{
return m_tilePixelRatio;
Modified: sandbox/jng/tiling_v3/Common/MapGuideCommon/MapLayer/Map.h
===================================================================
--- sandbox/jng/tiling_v3/Common/MapGuideCommon/MapLayer/Map.h 2019-06-10 15:23:36 UTC (rev 9541)
+++ sandbox/jng/tiling_v3/Common/MapGuideCommon/MapLayer/Map.h 2019-06-11 13:29:07 UTC (rev 9542)
@@ -549,6 +549,27 @@
/// Returns the tile pixel ratio for retina tiles
INT32 GetTilePixelRatio();
+ //////////////////////////////////////////////////////////////////
+ /// \brief
+ /// Returns the tile content format for the tile set definition
+ ///
+ /// <!-- Syntax in .Net, Java, and PHP -->
+ /// \htmlinclude DotNetSyntaxTop.html
+ /// string GetTileFormat();
+ /// \htmlinclude SyntaxBottom.html
+ /// \htmlinclude JavaSyntaxTop.html
+ /// String GetTileFormat();
+ /// \htmlinclude SyntaxBottom.html
+ /// \htmlinclude PHPSyntaxTop.html
+ /// string GetTileFormat();
+ /// \htmlinclude SyntaxBottom.html
+ ///
+ /// \since 4.0
+ ///
+ /// \return
+ /// Returns the tile content format
+ STRING GetTileFormat();
+
INTERNAL_API:
//////////////////////////////////////////////////////////////////
@@ -831,6 +852,7 @@
INT32 m_watermarkUsage;
STRING m_tileSetProvider;
+ STRING m_tileFormat;
INT32 m_tilePixelRatio;
};
/// \}
Modified: sandbox/jng/tiling_v3/Common/Schema/RuntimeMap-4.0.0.xsd
===================================================================
--- sandbox/jng/tiling_v3/Common/Schema/RuntimeMap-4.0.0.xsd 2019-06-10 15:23:36 UTC (rev 9541)
+++ sandbox/jng/tiling_v3/Common/Schema/RuntimeMap-4.0.0.xsd 2019-06-11 13:29:07 UTC (rev 9542)
@@ -16,7 +16,7 @@
<xs:documentation>The name of the runtime map. This is the value required for any mapagent operation that require a MAPNAME parameter</xs:documentation>
</xs:annotation>
</xs:element>
- <xs:element name="MapDefinition" type="xs:string">
+ <xs:element name="MapDefinition" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>The resource id of the Map Definition from which this runtime map was created from</xs:documentation>
</xs:annotation>
@@ -31,6 +31,11 @@
<xs:documentation>The provider for the Tile Set Definition</xs:documentation>
</xs:annotation>
</xs:element>
+ <xs:element name="TileFormat" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>The tile content format</xs:documentation>
+ </xs:annotation>
+ </xs:element>
<xs:element name="TilePixelRatio" type="xs:integer" minOccurs="0">
<xs:annotation>
<xs:documentation>The tile pixel ratio for retina tiles</xs:documentation>
Modified: sandbox/jng/tiling_v3/Server/src/Services/Mapping/ServerMappingService.cpp
===================================================================
--- sandbox/jng/tiling_v3/Server/src/Services/Mapping/ServerMappingService.cpp 2019-06-10 15:23:36 UTC (rev 9541)
+++ sandbox/jng/tiling_v3/Server/src/Services/Mapping/ServerMappingService.cpp 2019-06-11 13:29:07 UTC (rev 9542)
@@ -1268,9 +1268,22 @@
xml.append(MgUtil::WideCharToMultiByte(targetMapName));
xml.append("</Name>\n");
// ------------------------------ Map Definition ID --------------------------------- //
- xml.append("<MapDefinition>");
- xml.append(MgUtil::WideCharToMultiByte(mapDefinition->ToString()));
- xml.append("</MapDefinition>\n");
+ if (schemaVersion >= MG_API_VERSION(4, 0, 0))
+ {
+ //Map Definition may be null under this version
+ if (NULL != mapDefinition.p)
+ {
+ xml.append("<MapDefinition>");
+ xml.append(MgUtil::WideCharToMultiByte(mapDefinition->ToString()));
+ xml.append("</MapDefinition>\n");
+ }
+ }
+ else
+ {
+ xml.append("<MapDefinition>");
+ xml.append(MgUtil::WideCharToMultiByte(mapDefinition->ToString()));
+ xml.append("</MapDefinition>\n");
+ }
//Write tile set definition if requesting a v3.0.0 response or higher
if (NULL != (MgResourceIdentifier*)tileSetDefinition && schemaVersion >= MG_API_VERSION(3, 0, 0))
{
@@ -1293,6 +1306,10 @@
xml.append(MgUtil::WideCharToMultiByte(map->GetTileSetProvider()));
xml.append("</TileSetProvider>\n");
+ xml.append("<TileFormat>");
+ xml.append(MgUtil::WideCharToMultiByte(map->GetTileFormat()));
+ xml.append("</TileFormat>\n");
+
xml.append("<TilePixelRatio>");
std::string sPR;
MgUtil::Int32ToString(map->GetTilePixelRatio(), sPR);
Modified: sandbox/jng/tiling_v3/Server/src/UnitTesting/TestMappingService.cpp
===================================================================
--- sandbox/jng/tiling_v3/Server/src/UnitTesting/TestMappingService.cpp 2019-06-10 15:23:36 UTC (rev 9541)
+++ sandbox/jng/tiling_v3/Server/src/UnitTesting/TestMappingService.cpp 2019-06-11 13:29:07 UTC (rev 9542)
@@ -207,6 +207,11 @@
Ptr<MgByteReader> tsdrdr1 = tsdsrc1->GetReader();
m_svcResource->SetResource(tilesetres1, tsdrdr1, NULL);
+ Ptr<MgResourceIdentifier> tilesetres2 = new MgResourceIdentifier(L"Library://UnitTests/TileSets/XYZ.TileSetDefinition");
+ Ptr<MgByteSource> tsdsrc2 = new MgByteSource(L"../UnitTestFiles/UT_XYZ.tsd", false);
+ Ptr<MgByteReader> tsdrdr2 = tsdsrc2->GetReader();
+ m_svcResource->SetResource(tilesetres2, tsdrdr2, NULL);
+
Ptr<MgByteSource> bsPackage = new MgByteSource(L"../UnitTestFiles/PlotHole.mgp", false);
Ptr<MgByteReader> pkgReader = bsPackage->GetReader();
m_svcResource->ApplyResourcePackage(pkgReader);
@@ -289,6 +294,9 @@
Ptr<MgResourceIdentifier> tilesetres1 = new MgResourceIdentifier(L"Library://UnitTests/TileSets/Sheboygan.TileSetDefinition");
m_svcResource->DeleteResource(tilesetres1);
+ Ptr<MgResourceIdentifier> tilesetres2 = new MgResourceIdentifier(L"Library://UnitTests/TileSets/XYZ.TileSetDefinition");
+ m_svcResource->DeleteResource(tilesetres2);
+
Ptr<MgResourceIdentifier> plotHoleFolder = new MgResourceIdentifier(L"Library://UnitTests/PlotHole/");
m_svcResource->DeleteResource(plotHoleFolder);
@@ -314,91 +322,111 @@
ACE_DEBUG((LM_INFO, ACE_TEXT("\nMapping Service tests completed.\n\n")));
}
-void TestMappingService::TestCase_CreateRuntimeMap()
+void TestMappingService::TestCase_CreateRuntimeMap(INT32 major, INT32 minor, INT32 rev)
{
try
{
+ STRING suffix = L"_";
+ STRING s;
+ MgUtil::Int32ToString(major, s);
+ suffix += s;
+ suffix += L"_";
+ MgUtil::Int32ToString(minor, s);
+ suffix += s;
+ suffix += L"_";
+ MgUtil::Int32ToString(rev, s);
+ suffix += s;
+ auto schemaVersion = MG_API_VERSION(major, minor, rev);
+
//make a runtime map
Ptr<MgResourceIdentifier> mdfres = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
STRING format = MgImageFormats::Png;
//call the API
- Ptr<MgByteReader> rtMap = m_svcMapping->CreateRuntimeMap(mdfres, L"UnitTestSheboygan1", m_session, format, 16, 16, 0, 25);
+ Ptr<MgByteReader> rtMap = m_svcMapping->CreateRuntimeMap(mdfres, L"UnitTestSheboygan1", m_session, format, 16, 16, 0, 25, schemaVersion);
Ptr<MgByteSink> sink = new MgByteSink(rtMap);
sink->ToFile(L"../UnitTestFiles/RuntimeMapBarebones.xml");
- rtMap = m_svcMapping->CreateRuntimeMap(mdfres, L"UnitTestSheboygan2", m_session, format, 16, 16, 1, 25);
+ rtMap = m_svcMapping->CreateRuntimeMap(mdfres, L"UnitTestSheboygan2", m_session, format, 16, 16, 1, 25, schemaVersion);
sink = new MgByteSink(rtMap);
- sink->ToFile(L"../UnitTestFiles/RuntimeMapLayersAndGroups.xml");
+ sink->ToFile(L"../UnitTestFiles/RuntimeMapLayersAndGroups" + suffix + L".xml");
- rtMap = m_svcMapping->CreateRuntimeMap(mdfres, L"UnitTestSheboygan3", m_session, format, 16, 16, (1 | 2), 25);
+ rtMap = m_svcMapping->CreateRuntimeMap(mdfres, L"UnitTestSheboygan3", m_session, format, 16, 16, (1 | 2), 25, schemaVersion);
sink = new MgByteSink(rtMap);
- sink->ToFile(L"../UnitTestFiles/RuntimeMapLayersAndGroupsWithIconsPNG16x16.xml");
+ sink->ToFile(L"../UnitTestFiles/RuntimeMapLayersAndGroupsWithIconsPNG16x16" + suffix + L".xml");
- rtMap = m_svcMapping->CreateRuntimeMap(mdfres, L"UnitTestSheboygan4", m_session, format, 16, 16, (1 | 2 | 4), 25);
+ rtMap = m_svcMapping->CreateRuntimeMap(mdfres, L"UnitTestSheboygan4", m_session, format, 16, 16, (1 | 2 | 4), 25, schemaVersion);
sink = new MgByteSink(rtMap);
- sink->ToFile(L"../UnitTestFiles/RuntimeMapLayersAndGroupsWithIconsAndFeatureSourcePNG16x16.xml");
+ sink->ToFile(L"../UnitTestFiles/RuntimeMapLayersAndGroupsWithIconsAndFeatureSourcePNG16x16" + suffix + L".xml");
- rtMap = m_svcMapping->CreateRuntimeMap(mdfres, L"UnitTestSheboygan5", m_session, format, 32, 32, (1 | 2), 25);
+ rtMap = m_svcMapping->CreateRuntimeMap(mdfres, L"UnitTestSheboygan5", m_session, format, 32, 32, (1 | 2), 25, schemaVersion);
sink = new MgByteSink(rtMap);
- sink->ToFile(L"../UnitTestFiles/RuntimeMapLayersAndGroupsWithIconsPNG32x32.xml");
+ sink->ToFile(L"../UnitTestFiles/RuntimeMapLayersAndGroupsWithIconsPNG32x32" + suffix + L".xml");
- rtMap = m_svcMapping->CreateRuntimeMap(mdfres, L"UnitTestSheboygan6", m_session, format, 32, 32, (1 | 2 | 4), 25);
+ rtMap = m_svcMapping->CreateRuntimeMap(mdfres, L"UnitTestSheboygan6", m_session, format, 32, 32, (1 | 2 | 4), 25, schemaVersion);
sink = new MgByteSink(rtMap);
- sink->ToFile(L"../UnitTestFiles/RuntimeMapLayersAndGroupsWithIconsAndFeatureSourcePNG32x32.xml");
+ sink->ToFile(L"../UnitTestFiles/RuntimeMapLayersAndGroupsWithIconsAndFeatureSourcePNG32x32" + suffix + L".xml");
format = MgImageFormats::Gif;
- rtMap = m_svcMapping->CreateRuntimeMap(mdfres, L"UnitTestSheboygan3", m_session, format, 16, 16, (1 | 2), 25);
+ rtMap = m_svcMapping->CreateRuntimeMap(mdfres, L"UnitTestSheboygan3", m_session, format, 16, 16, (1 | 2), 25, schemaVersion);
sink = new MgByteSink(rtMap);
- sink->ToFile(L"../UnitTestFiles/RuntimeMapLayersAndGroupsWithIconsGIF16x16.xml");
+ sink->ToFile(L"../UnitTestFiles/RuntimeMapLayersAndGroupsWithIconsGIF16x16" + suffix + L".xml");
- rtMap = m_svcMapping->CreateRuntimeMap(mdfres, L"UnitTestSheboygan4", m_session, format, 16, 16, (1 | 2 | 4), 25);
+ rtMap = m_svcMapping->CreateRuntimeMap(mdfres, L"UnitTestSheboygan4", m_session, format, 16, 16, (1 | 2 | 4), 25, schemaVersion);
sink = new MgByteSink(rtMap);
- sink->ToFile(L"../UnitTestFiles/RuntimeMapLayersAndGroupsWithIconsAndFeatureSourceGIF16x16.xml");
+ sink->ToFile(L"../UnitTestFiles/RuntimeMapLayersAndGroupsWithIconsAndFeatureSourceGIF16x16" + suffix + L".xml");
- rtMap = m_svcMapping->CreateRuntimeMap(mdfres, L"UnitTestSheboygan5", m_session, format, 32, 32, (1 | 2), 25);
+ rtMap = m_svcMapping->CreateRuntimeMap(mdfres, L"UnitTestSheboygan5", m_session, format, 32, 32, (1 | 2), 25, schemaVersion);
sink = new MgByteSink(rtMap);
- sink->ToFile(L"../UnitTestFiles/RuntimeMapLayersAndGroupsWithIconsGIF32x32.xml");
+ sink->ToFile(L"../UnitTestFiles/RuntimeMapLayersAndGroupsWithIconsGIF32x32" + suffix + L".xml");
- rtMap = m_svcMapping->CreateRuntimeMap(mdfres, L"UnitTestSheboygan6", m_session, format, 32, 32, (1 | 2 | 4), 25);
+ rtMap = m_svcMapping->CreateRuntimeMap(mdfres, L"UnitTestSheboygan6", m_session, format, 32, 32, (1 | 2 | 4), 25, schemaVersion);
sink = new MgByteSink(rtMap);
- sink->ToFile(L"../UnitTestFiles/RuntimeMapLayersAndGroupsWithIconsAndFeatureSourceGIF32x32.xml");
+ sink->ToFile(L"../UnitTestFiles/RuntimeMapLayersAndGroupsWithIconsAndFeatureSourceGIF32x32" + suffix + L".xml");
format = MgImageFormats::Jpeg;
- rtMap = m_svcMapping->CreateRuntimeMap(mdfres, L"UnitTestSheboygan3", m_session, format, 16, 16, (1 | 2), 25);
+ rtMap = m_svcMapping->CreateRuntimeMap(mdfres, L"UnitTestSheboygan3", m_session, format, 16, 16, (1 | 2), 25, schemaVersion);
sink = new MgByteSink(rtMap);
- sink->ToFile(L"../UnitTestFiles/RuntimeMapLayersAndGroupsWithIconsJPEG16x16.xml");
+ sink->ToFile(L"../UnitTestFiles/RuntimeMapLayersAndGroupsWithIconsJPEG16x16" + suffix + L".xml");
- rtMap = m_svcMapping->CreateRuntimeMap(mdfres, L"UnitTestSheboygan4", m_session, format, 16, 16, (1 | 2 | 4), 25);
+ rtMap = m_svcMapping->CreateRuntimeMap(mdfres, L"UnitTestSheboygan4", m_session, format, 16, 16, (1 | 2 | 4), 25, schemaVersion);
sink = new MgByteSink(rtMap);
- sink->ToFile(L"../UnitTestFiles/RuntimeMapLayersAndGroupsWithIconsAndFeatureSourceJPEG16x16.xml");
+ sink->ToFile(L"../UnitTestFiles/RuntimeMapLayersAndGroupsWithIconsAndFeatureSourceJPEG16x16" + suffix + L".xml");
- rtMap = m_svcMapping->CreateRuntimeMap(mdfres, L"UnitTestSheboygan5", m_session, format, 32, 32, (1 | 2), 25);
+ rtMap = m_svcMapping->CreateRuntimeMap(mdfres, L"UnitTestSheboygan5", m_session, format, 32, 32, (1 | 2), 25, schemaVersion);
sink = new MgByteSink(rtMap);
- sink->ToFile(L"../UnitTestFiles/RuntimeMapLayersAndGroupsWithIconsJPEG32x32.xml");
+ sink->ToFile(L"../UnitTestFiles/RuntimeMapLayersAndGroupsWithIconsJPEG32x32" + suffix + L".xml");
- rtMap = m_svcMapping->CreateRuntimeMap(mdfres, L"UnitTestSheboygan6", m_session, format, 32, 32, (1 | 2 | 4), 25);
+ rtMap = m_svcMapping->CreateRuntimeMap(mdfres, L"UnitTestSheboygan6", m_session, format, 32, 32, (1 | 2 | 4), 25, schemaVersion);
sink = new MgByteSink(rtMap);
- sink->ToFile(L"../UnitTestFiles/RuntimeMapLayersAndGroupsWithIconsAndFeatureSourceJPEG32x32.xml");
+ sink->ToFile(L"../UnitTestFiles/RuntimeMapLayersAndGroupsWithIconsAndFeatureSourceJPEG32x32" + suffix + L".xml");
format = MgImageFormats::Png8;
- rtMap = m_svcMapping->CreateRuntimeMap(mdfres, L"UnitTestSheboygan3", m_session, format, 16, 16, (1 | 2), 25);
+ rtMap = m_svcMapping->CreateRuntimeMap(mdfres, L"UnitTestSheboygan3", m_session, format, 16, 16, (1 | 2), 25, schemaVersion);
sink = new MgByteSink(rtMap);
- sink->ToFile(L"../UnitTestFiles/RuntimeMapLayersAndGroupsWithIconsPNG816x16.xml");
+ sink->ToFile(L"../UnitTestFiles/RuntimeMapLayersAndGroupsWithIconsPNG816x16" + suffix + L".xml");
- rtMap = m_svcMapping->CreateRuntimeMap(mdfres, L"UnitTestSheboygan4", m_session, format, 16, 16, (1 | 2 | 4), 25);
+ rtMap = m_svcMapping->CreateRuntimeMap(mdfres, L"UnitTestSheboygan4", m_session, format, 16, 16, (1 | 2 | 4), 25, schemaVersion);
sink = new MgByteSink(rtMap);
- sink->ToFile(L"../UnitTestFiles/RuntimeMapLayersAndGroupsWithIconsAndFeatureSourcePNG816x16.xml");
+ sink->ToFile(L"../UnitTestFiles/RuntimeMapLayersAndGroupsWithIconsAndFeatureSourcePNG816x16" + suffix + L".xml");
- rtMap = m_svcMapping->CreateRuntimeMap(mdfres, L"UnitTestSheboygan5", m_session, format, 32, 32, (1 | 2), 25);
+ rtMap = m_svcMapping->CreateRuntimeMap(mdfres, L"UnitTestSheboygan5", m_session, format, 32, 32, (1 | 2), 25, schemaVersion);
sink = new MgByteSink(rtMap);
- sink->ToFile(L"../UnitTestFiles/RuntimeMapLayersAndGroupsWithIconsPNG832x32.xml");
+ sink->ToFile(L"../UnitTestFiles/RuntimeMapLayersAndGroupsWithIconsPNG832x32" + suffix + L".xml");
- rtMap = m_svcMapping->CreateRuntimeMap(mdfres, L"UnitTestSheboygan6", m_session, format, 32, 32, (1 | 2 | 4), 25);
+ rtMap = m_svcMapping->CreateRuntimeMap(mdfres, L"UnitTestSheboygan6", m_session, format, 32, 32, (1 | 2 | 4), 25, schemaVersion);
sink = new MgByteSink(rtMap);
- sink->ToFile(L"../UnitTestFiles/RuntimeMapLayersAndGroupsWithIconsAndFeatureSourcePNG832x32.xml");
+ sink->ToFile(L"../UnitTestFiles/RuntimeMapLayersAndGroupsWithIconsAndFeatureSourcePNG832x32" + suffix + L".xml");
+
+ if (schemaVersion >= MG_API_VERSION(4, 0, 0))
+ {
+ Ptr<MgResourceIdentifier> tsdRes = new MgResourceIdentifier(L"Library://UnitTests/TileSets/XYZ.TileSetDefinition");
+ rtMap = m_svcMapping->CreateRuntimeMap(tsdRes, L"UnitTestSheboygan7", m_session, format, 32, 32, (1 | 2 | 4), 25, schemaVersion);
+ sink = new MgByteSink(rtMap);
+ sink->ToFile(L"../UnitTestFiles/RuntimeMapFromTileSetLayersAndGroupsWithIconsAndFeatureSourcePNG832x32" + suffix + L".xml");
+ }
}
catch(MgException* e)
{
Modified: sandbox/jng/tiling_v3/Server/src/UnitTesting/TestMappingService.h
===================================================================
--- sandbox/jng/tiling_v3/Server/src/UnitTesting/TestMappingService.h 2019-06-10 15:23:36 UTC (rev 9541)
+++ sandbox/jng/tiling_v3/Server/src/UnitTesting/TestMappingService.h 2019-06-11 13:29:07 UTC (rev 9542)
@@ -39,7 +39,9 @@
CPPUNIT_TEST(TestCase_GetLegendImageCompositeConvenience);
CPPUNIT_TEST(TestCase_GetLegendImageCompositeThemedConvenience);
CPPUNIT_TEST(TestCase_GetLegendImagePointStyleWithConstRotationsConvenience);
- CPPUNIT_TEST(TestCase_CreateRuntimeMap);
+ CPPUNIT_TEST(TestCase_CreateRuntimeMap260);
+ CPPUNIT_TEST(TestCase_CreateRuntimeMap300);
+ CPPUNIT_TEST(TestCase_CreateRuntimeMap400);
CPPUNIT_TEST(TestCase_DescribeRuntimeMap);
CPPUNIT_TEST(TestCase_CreateAndDescribeLinkedRuntimeMap);
//CPPUNIT_TEST(TestCase_QueryFeaturesImageMap);
@@ -57,7 +59,10 @@
void TestStart();
void TestEnd();
- void TestCase_CreateRuntimeMap();
+ void TestCase_CreateRuntimeMap(INT32 major, INT32 minor, INT32 rev);
+ void TestCase_CreateRuntimeMap260() { TestCase_CreateRuntimeMap(2, 6, 0); }
+ void TestCase_CreateRuntimeMap300() { TestCase_CreateRuntimeMap(3, 0, 0); }
+ void TestCase_CreateRuntimeMap400() { TestCase_CreateRuntimeMap(4, 0, 0); }
void TestCase_DescribeRuntimeMap();
void TestCase_SaveMap();
void TestCase_GetPlot();
More information about the mapguide-commits
mailing list