符号不显示在ArcGIS地图上使用Qt
Symbol does not show up on ArcGIS Map using Qt
我与ArcGIS api一起使用Qt,我想使用MessageHelper类显示军事符号。下面是我的代码:
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);
我只看到地图,没有看到符号。我使用的是Qt-Creator 5.7和ArcGIS sdk 10.2.6。是我遗漏了什么,还是我的点定义有问题?我希望这个符号在世界地图的中间看到,因为我使用默认的空间参考,但我没有看到任何东西。
层和消息使用2种不同的符号字典类型-层是用Mil2525C创建的,消息是用App6B创建的。
相关文章:
- Qt VTK交互风格的信号到小部件
- QT在错误的班级中寻找空位
- 如何在选项卡视图Qt中设置一个新项目,并保存以前的项目
- 为什么不;名字在地图上是按顺序排列的吗
- 如何在Qt窗口小部件中使用QStringView(或QStringRef)
- 如何在Qt C++中更改光标
- 基于多个条件处理地图中的所有元素
- 如何在MS Visual Studio 2019中运行QT UI
- QT通过C++添加映射QML项目
- libssh 的函数在构建 libssh 时无法在 Qt 和 cmake 错误中找到
- 如何将点击的信号和插槽添加到qt中的自定义按钮中
- 在C++中将矢量转换为嵌套地图
- Qt C++静态thread_local QNetworkAccessManager是线程应用程序的好选择吗
- Qt C++ 如何将哈希的副本复制到地图
- 如何在 c++ 语言中使用带有 MFC 或 QT 的谷歌地图 API?
- 当我尝试将一对插入地图时,Qt程序seg出错
- (Qt C++)暂时"disable" 2D 地图中的一个键?
- 符号不显示在ArcGIS地图上使用Qt
- (c++,Qt,Linux)将游戏地图线转换为图像线
- Qt快速android谷歌地图