I am using Qt together with the ArcGIS api and I want to display a military symbol using the MessageHelper class. Here is my code:
m_map = new EsriRuntimeQt::Map(this);
m_mapGraphicsView = EsriRuntimeQt::MapGraphicsView::create(m_map, this);
setCentralWidget(m_mapGraphicsView);
m_map->setWrapAroundEnabled(false);
QString path = EsriRuntimeQt::ArcGISRuntime::installDirectory();
path.append("/sdk/samples/data");
QDir dataDir(path); // using QDir to convert to correct file separator
QString pathSampleData = dataDir.path() + QDir::separator();
// ArcGIS Online Tiled Basemap Layer
m_tiledServiceLayer = new EsriRuntimeQt::ArcGISTiledMapServiceLayer("http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer", this);
m_map->addLayer(m_tiledServiceLayer);
// test message processing
m_msgGroupLayer = new EsriRuntimeQt::MessageGroupLayer(EsriRuntimeQt::SymbolDictionaryType::Mil2525C);
m_map->addLayer(m_msgGroupLayer);
// build message
EsriRuntimeQt::Point pt(0, 0, m_map->spatialReference());
QList<EsriRuntimeQt::Point> controlPoints;
controlPoints.push_back(pt);
EsriRuntimeQt::Message msg = EsriRuntimeQt::MessageHelper::createUpdateMessage(EsriRuntimeQt::SymbolDictionaryType::App6B, "1", "position_report", controlPoints);
// process the message
m_msgGroupLayer->messageProcessor()->processMessage(msg);
I only see the map but no symbol. I am using Qt-Creator 5.7 and the ArcGIS sdk 10.2.6. Am I somthing missing or is something wrong with my point definition? I expect the symbol to see in the middle of the world map as I use the default spatial reference but I don't see anything there.
The layer and the message use 2 different symbol dictionary types - the layer is created with Mil2525C and the message is created with App6B. These should match.