markus.brigl

Methods and signals of EsriRuntimeQt::Layer don't work

Discussion created by markus.brigl on May 12, 2013
Latest reply on May 14, 2013 by JTrieu-esristaff
I tried the example the example created by the QtCreator wizard. The USCitiesStates.mpk provides 3 Layers, correctly shown on the map, but the dynamic.layers.length() returns always 0.
Even the signal "layerCreateComplete" is newer thrown

[INDENT]...
    // Local Dynamic Layer using: sdk/samples/data/mpks/USCitiesStates.mpk"
     QString localDynamicLayer = pathSampleData + "mpks" + QDir::separator() + "USCitiesStates.mpk";
     EsriRuntimeQt::ArcGISLocalDynamicMapServiceLayer dynamicLayer(localDynamicLayer);

     connect(&dynamicLayer, SIGNAL(layerCreateComplete(EsriRuntimeQt::Layer)), this, SLOT(layerCreateComplete(EsriRuntimeQt

     pMap->addLayer(dynamicLayer);
     qDebug(qPrintable(QString("%1").arg(dynamicLayer.layers().length())));
}


void MainWindow::layerCreateComplete(const EsriRuntimeQt::Layer &layer)
{
    qDebug(qPrintable(QString("%1").arg(layer.name())));
}[/INDENT]

Outcomes