AnsweredAssumed Answered

the local server start but the window popped up shows nothing?

Question asked by nocefly on Oct 22, 2014
Latest reply on Nov 1, 2014 by nocefly

Hi, i installed ArcGIS Runtime Qt 10.2.3. Local server failed to start when i test the first sample. It seems the ArcGISRuntime::installDirectory() returns null because the path  returned is not right. When i set the install path by using setInstallDirectory function, the local server works. However, the window popped up shows nothing.

 

Code:

    QString mypath="/home/wu/arcgis/runtime_sdk/qt10.2.3";

    EsriRuntimeQt::ArcGISRuntime::setInstallDirectory(mypath);

    EsriRuntimeQt::ArcGISRuntime::setRenderEngine(EsriRuntimeQt::RenderEngine::OpenGL);

    m_mapGraphicsView = EsriRuntimeQt::MapGraphicsView::create(m_map, this);

    setCentralWidget(m_mapGraphicsView);

    m_map.setWrapAroundEnabled(false);

    // show Esri logo by default

    m_map.setEsriLogoVisible(true);

    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();

 

    QString dataPath = pathSampleData + "mpks" + QDir::separator() + "USCitiesStates.mpk";

    m_localMapService = EsriRuntimeQt::LocalMapService(dataPath);

 

 

  // connect to signal that is emitted when the service is created successfully

     connect(&m_localMapService, SIGNAL(serviceCreationSuccess(const QString&, const QString&)), this, SLOT(onLocalServiceCreationSuccess(const      QString&, const QString&)));

 

 

  // connect to signal that is emitted when the service failed

     connect(&m_localMapService, SIGNAL(serviceCreationFailure(const QString&)), this, SLOT(onLocalServiceCreationFailure(const QString&)));

 

 

  // start the service and the Local Server

     m_localMapService.start();

Outcomes