Hello,
I'm attempting to display ENC data using QML but being new to both Qt creator and the ArcGIS SDK, I'm having trouble following the sparse documentation. It's not clear to me if/when I'm supposed to be calling the component load functions, how to create an EncCell from an EncExchangeSet dataset, and how to add an EncLayer to a map view. I believe I have loaded an EncExchangeSet component, but I'm not sure where to go from there. Is there sample code that I can look at somewhere for displaying ENC data using QML?
Thanks in advance.
Hello Stephen,
While putting together an example for you, we've discovered a bug that needs to be addressed before it can work properly. We will try to address this as soon as possible. Thank you for your patience!
Eric,
Thanks for the help, I look forward to the bugfix and example.
Could you describe what the bug is? Will it completely prevent us form using the ENC, or does it cause some edge case crashes?
If it's a completely showstopper, what's the approximate ETA on the bugfix?
Any update on this? I was using the ENC today and noticed that I get different results depending on whether I use QQuickView or QQMLApplicationEngine. 😮
In a nutshell, if I use QQuickView, then setting the map's extents works correctly. If I use QQMLApplicationEngine, then the extents are off by some skewing factor. It's almost as if the ENC layer draws itself into a separate larger bounding box.
It'd be nice to know if this was related to the bug mentioned above. It's driving me crazy right now.
Could you please message me a simple project that demonstrates the issues you are seeing? Thanks!
The bug Eric was referring to was in the QML API only (no C++ issues). The issue was that the load cycle in QML was not working correctly which could cause the EncLayer to not display at all.
Just curious if there is any final resolution on whatever the bug was. I think it's resolved now because there's a QML example for the AddEncExchangeSet, but it would be nice to close out this topic since it still is at the top of the search engines.
If it helps at all, the C++ API is working brilliantly...
// create EncExchangeSet using paths encExchangeSet = new EncExchangeSet(QStringList("D:\\Enc\\ExchangeSetwithoutUpdates\\ENC_ROOT\\CATALOG.031"), this); connect(encExchangeSet, &EncExchangeSet::doneLoading, this, [this]{ // get the list of EncDataset QList<EncDataset*> EncDatasets = encExchangeSet->datasets(); // display the names of EncDataset for (EncDataset* EncDataset: EncDatasets) { // Create the cell and layer myEncLayer = new EncLayer(new EncCell(EncDataset)); // Add the layer to the map m_map->operationalLayers()->append(myEncLayer); } }); // Load the EncExchangeSet encExchangeSet->load(); // Set map to map view m_mapView->setMap(m_map);
Thanks Eric, I did manage to get it working with the C++ API and your example.