I am using the Esri ArcGIS QT API for C++ and trying to create an overview map for my application as found here:
Multiple maps - https://developers.arcgis.com/qt/cpp/guide/multiple-maps.htm
I am experiencing difficulty as I am using the QGraphicsProxyWidget to add my second map and getting a blank white screen in addition to the applications output being:
QOpenGLShaderProgram::bind: program is not valid in the current context.This is the segment I am having trouble with:
QMainWindow* overViewContainer = new QMainWindow;QHBoxLayout* boxLayout = new QHBoxLayout;boxLayout->addWidget(overViewContainer);EsriRuntimeQt::Map* overViewMap = new EsriRuntimeQt::Map(overViewContainer);EsriRuntimeQt::MapGraphicsView* graphicsOverviewMap = EsriRuntimeQt::MapGraphicsView::create(overViewMap, overViewContainer);overViewContainer->setCentralWidget(graphicsOverviewMap);QWidget* mainItem = new QWidget;mainItem->setLayout(boxLayout);m_mapGraphicsView = EsriRuntimeQt::MapGraphicsView::create(m_map, this);setCentralWidget(m_mapGraphicsView);m_map->setWrapAroundEnabled(false);QGraphicsProxyWidget *proxy = m_mapGraphicsView->scene()->addWidget(mainItem);proxy->setAutoFillBackground(true);proxy->resize(300,300);proxy->setPos(5,5);proxy->setActive(true);QString path = EsriRuntimeQt::ArcGISRuntime::installDirectory();path.append("/sdk/samples/data");QDir dataDir(path); // using QDir to convert to correct file separatorQString pathSampleData = dataDir.path() + QDir::separator();//// ArcGIS Online Tiled Basemap Layerm_tiledServiceLayer = new EsriRuntimeQt::ArcGISTiledMapServiceLayer("http://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer", this);m_map->addLayer(m_tiledServiceLayer);EsriRuntimeQt::ArcGISTiledMapServiceLayer *m_world = new EsriRuntimeQt::ArcGISTiledMapServiceLayer("http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer", this);overViewMap->addLayer(m_world);overViewMap->setExtent(m_map->extent());
أكثر...
Multiple maps - https://developers.arcgis.com/qt/cpp/guide/multiple-maps.htm
I am experiencing difficulty as I am using the QGraphicsProxyWidget to add my second map and getting a blank white screen in addition to the applications output being:
QOpenGLShaderProgram::bind: program is not valid in the current context.This is the segment I am having trouble with:
QMainWindow* overViewContainer = new QMainWindow;QHBoxLayout* boxLayout = new QHBoxLayout;boxLayout->addWidget(overViewContainer);EsriRuntimeQt::Map* overViewMap = new EsriRuntimeQt::Map(overViewContainer);EsriRuntimeQt::MapGraphicsView* graphicsOverviewMap = EsriRuntimeQt::MapGraphicsView::create(overViewMap, overViewContainer);overViewContainer->setCentralWidget(graphicsOverviewMap);QWidget* mainItem = new QWidget;mainItem->setLayout(boxLayout);m_mapGraphicsView = EsriRuntimeQt::MapGraphicsView::create(m_map, this);setCentralWidget(m_mapGraphicsView);m_map->setWrapAroundEnabled(false);QGraphicsProxyWidget *proxy = m_mapGraphicsView->scene()->addWidget(mainItem);proxy->setAutoFillBackground(true);proxy->resize(300,300);proxy->setPos(5,5);proxy->setActive(true);QString path = EsriRuntimeQt::ArcGISRuntime::installDirectory();path.append("/sdk/samples/data");QDir dataDir(path); // using QDir to convert to correct file separatorQString pathSampleData = dataDir.path() + QDir::separator();//// ArcGIS Online Tiled Basemap Layerm_tiledServiceLayer = new EsriRuntimeQt::ArcGISTiledMapServiceLayer("http://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer", this);m_map->addLayer(m_tiledServiceLayer);EsriRuntimeQt::ArcGISTiledMapServiceLayer *m_world = new EsriRuntimeQt::ArcGISTiledMapServiceLayer("http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer", this);overViewMap->addLayer(m_world);overViewMap->setExtent(m_map->extent());
أكثر...