Select to view content in your preferred language

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

3675
4
10-22-2014 07:37 AM
JoneWu
by
Deactivated User

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

0 Kudos
4 Replies
EricBader
Honored Contributor

Hi Jone:

Can you share which platform you are running on? Linux? Windows?

0 Kudos
JoneWu
by
Deactivated User

Hi Bader, i run on Red Hat Enterprise Linux 6 64bit. Another question is that  the map browse is not very fluent when i used the tpk file(about 10M). Is the ArcGis server is necessary if i need to add a more large map file(100M for example)? My computer is 8G memory and i7 processor.

0 Kudos
EricBader
Honored Contributor

The size of the tpk should not have an effect on performance. You should be ok there.

Still not sure what issue your Local Server is having.

Try this.

  1. In a console, cd to your qt SDK home dir and execute the "localServerUtility" program.
  2. Check the box that says 'Enable logging'
  3. Run the Local Server sample that you said was failing
  4. Navigate to /tmp/ArcGISRuntimeLogs folder, where you'll find a log file.

Open it, look for any errors in that file, and post them here. Lets see what they indicate.

Thanks

0 Kudos
JoneWu
by
Deactivated User

Hi Bader, I have solved the problem after i installed ArcGis Runtime for Qt again.

But another question is that the map loads not very fluent when i used the sample(both tpk and mpk files). I also have tried to connect to ArcGIS Server 10.1(in LAN) to access the tpk file(Topographic.tpk in sample, It's fast when i used browser to access it). It still works not very well. Is there any way to optimize the loading methods? I used the code the sample provides:

m_tiledServiceLayer=EsriRuntimeQt::ArcGISTiledMapServiceLayer('http://xxxxx');

m_map.addLayer(m_tiledServiceLayer);

Thank you very much!

0 Kudos