QT 5.15.2 开发地图ArcGIS 100.15.6(ArcGIS Runtime SDK for Qt)

  • QT 5.15.2
  • ArcGIS下载

Downloads | ArcGIS Runtime API for Qt | Esri Developer

  • ArcGIS安装(略)
  • 参考

Display a map | ArcGIS Maps SDK for Qt | Esri Developer

  • QT新建工程

步骤1

步骤2

步骤3

步骤4(选择Topographic不需要KEY)

步骤5(必须是MSVC2019 64bit!)

步骤6

  • 清理文件

QT新建ArcGIS工程,编译报错:\BookmarkListModel.h:100: error: C2039: "in": 不是 "Esri::ArcGISRuntime" 的成员-CSDN博客

  • 下载测试地图数据

https://download.csdn.net/download/quantum7/90369309

  • 修改代码

打开文件,修改参考如下:

复制代码
// Other headers
#include "ArcGISMapDemo.h"

#include "Map.h"
#include "MapGraphicsView.h"
#include "TileCache.h"
#include "ArcGISTiledLayer.h"

#define TPK_FILE "D:\\SVN-WORK\\SourceCode\\ResearchWork\\ArcGISMapDemo\\map-tpk-for-test\\gis.tpk"

using namespace Esri::ArcGISRuntime;

ArcGISMapDemo::ArcGISMapDemo(QWidget *parent /*=nullptr*/)
    : QMainWindow(parent)
{
    // Create a map using the ArcGISTopographic BasemapStyle
    //m_map = new Map(BasemapStyle::ArcGISTopographic, this);

    TileCache* tileCache = new TileCache(TPK_FILE, this);
    ArcGISTiledLayer* tiledLayer = new ArcGISTiledLayer(tileCache, this);
    Basemap* basemap = new Basemap(tiledLayer, this);
    m_map = new Map(basemap, this);

    // Create the Widget view
    m_mapView = new MapGraphicsView(this);
    // Set map to map view
    m_mapView->setMap(m_map);

    // set the mapView as the central widget
    setCentralWidget(m_mapView);
}

// destructor
ArcGISMapDemo::~ArcGISMapDemo() {}
相关推荐
24K纯学渣21 分钟前
Python编码格式化之PEP8编码规范
开发语言·ide·python·pycharm
怒视天下23 分钟前
零基础玩转Python生物信息学:数据分析与算法实现
开发语言·python
GISer_Jing1 小时前
Three.js中AR实现详解并详细介绍基于图像标记模式AR生成的详细步骤
开发语言·javascript·ar
委婉待续1 小时前
Qt的学习(一)
开发语言·qt·学习
笨笨马甲1 小时前
Qt Quick Layout功能及架构
开发语言·qt
Dovis(誓平步青云)1 小时前
探索C++标准模板库(STL):String接口的底层实现(下篇)
开发语言·c++·stl·string
海棠一号1 小时前
JAVA理论第五章-JVM
java·开发语言·jvm
草莓熊Lotso2 小时前
【数据结构初阶】--算法复杂度的深度解析
c语言·开发语言·数据结构·经验分享·笔记·其他·算法
海的诗篇_2 小时前
前端开发面试题总结-JavaScript篇(二)
开发语言·前端·javascript·typescript
feiyangqingyun2 小时前
Qt/C++开发监控GB28181系统/取流协议/同时支持udp/tcp被动/tcp主动
c++·qt·udp·gb28181