POST
|
Hi Joe - and thanks Antti for responding to this one - those are great suggestions for working around this issue. We do still prevent adding of features outside of the resgistered extent of the geodatabase. One other thing that you could consider would be to use the overrides workflow which we introduced in Runtime 100.4 (see "GenerateOfflineMapParameters" ArcGIS Runtime SDK for .NET - UWP API Reference | ArcGIS for Developers ) That approach would let you skip the spatial filter for a particular layer by accessing the underlying GenerateGeodatabaseParameters used to take it offline. So for example, you could identify the relevant GenerateLayerOption, and set the useGeometry property to false. That would mean downloading all of the features so wouldn't work if your data-set is too big. Hope that helps, Luke
... View more
01-17-2019
10:05 AM
|
0
|
1
|
518
|
POST
|
Hi Paul, I believe you should be able to use the boundary method on GeometryEngine (GeometryEngine QML Type | ArcGIS for Developers) to obtain the polyline boundary of the Envelope. Then you can use the polyline to construct your Polygon. It might still be more efficient to construct the polygon directly from the xMin, xMax, yMin, yMax of the original envelope though. I hope that helps, Luke
... View more
05-04-2018
04:22 AM
|
1
|
0
|
973
|
POST
|
Hi Paul, I'm glad you got the code working in the end. You are correct that GeometryEngine.intersect does expect that the two geometry objects be in a common SpatialReference. You don't necessarily need to project them both - you could do something like: var geom2Projected = GeometryEngine.project(geom2, geom1.spatialReference()); to put them in the same system. It's also worth connecting to the errorOccurred signal of the GeometryEngine object - that should give you some information where these kinds of operations are not working. I hope that helps, Luke
... View more
05-04-2018
04:16 AM
|
0
|
1
|
612
|
POST
|
Hi George, Thanks for getting in touch. The behavior you are seeing is expected because, as you say, the GraphicListModel does not take ownership of the Graphics which you append to it. You do need to manage the lifetime of these objects yourself - one approach is to use another QObject as the parent of the Graphic, rather than "this". So, for example, you could have a member variable (QObject* m_graphicsParent) on your class which you allocate prior to creating the graphics. Then each graphic would be created like so: Graphic* obj = new Graphic(m_graphicsParent); Then when you come to remove the Graphics you can just call: delete m_graphicsParent; m_graphicsOverlay->clear(); The above approach is for the case where you are adding and removing all of the graphics in the overlay in each pass - otherwise you may need to delete the graphics separately and call GraphicListModel::removeOne etc. I hope that helps, Luke
... View more
01-15-2018
08:34 AM
|
2
|
0
|
581
|
POST
|
Hi George, are you running on linux? I think that "LINUX_PLATFORM_REPLACEMENT" may not be defined in your project if you are building with cmake. We set this in one of our .pri files which is used by qmake/qtcreator and I am not 100% sure that will be used by your cmake project. It's probably worth adding some print statements so that you can confirm the import paths are correct (e.g. arcGISRuntimeImportPath and arcGISToolkitImportPath). You can also set the environment variable " QML_IMPORT_TRACE " (see Import Statements | Qt QML 5.10 ) to try and debug what is going on. I hope that helps, Luke
... View more
12-20-2017
06:42 AM
|
0
|
0
|
1376
|
POST
|
Hi Norbert - best wishes to you as well I think that the best approach would be to wait until all the elevation sources are loaded: that's because you want to ensure that your elevation queries use all available data. I think it would work as soon as one source is loaded so you should probably wait until you have the full data ready. It might be that the surface takes care of these load dependencies - but as I say, this is generally managed by the 3D scene/view so I'm not sure of the expectation in this scenario. Hope that helps, Luke
... View more
12-18-2017
02:05 AM
|
0
|
0
|
709
|
POST
|
Hi Anat, I hope you are well. Unfortunately, we do not currently have a synchronous version of this call. One approach that might work for you is to create a QEventLoop which you can run to wait until the operation completes. I've included some code below that shows how that could work - any questions, let me know: auto startTaskId = surface->locationToElevation(loc).taskId(); QEventLoop loop; loop.connect(surface, &Surface::locationToElevationCompleted, this, [this, &loop, startTaskId](QUuid taskId, double elevation) { if (taskId != startTaskId) return; qDebug() << elevation; loop.quit(); }); loop.connect(surface, &Surface::errorOccurred, &loop, &QEventLoop::quit); loop.exec();
... View more
12-15-2017
06:28 AM
|
0
|
0
|
382
|
POST
|
Hi Norbert, I hope you are well. I don't believe we do have an example of this workflow currently - but I will recommend we add one as it seems like a useful workflow to me. Here is some code I have put together to show how this could work. In this case I am creating a Surface and a single ArcGISTiledElevationSource. We have to manually load these since they are not added to the view in the same way we would for a 3D application. Once these are loaded, I am connecting to the mouseClicked signal on the MapView, obtaining a location for that click and starting the operation. I hope that helps, Luke ArcGISTiledElevationSource* elevationSource = new ArcGISTiledElevationSource( QUrl(yourUrl), this); connect(elevationSource, &ArcGISTiledElevationSource::errorOccurred, this, [](Error error) { qDebug() << error.message() << error.additionalMessage(); }); m_surface = new Surface(this); m_surface->elevationSources()->append(elevationSource); connect(m_surface, &Surface::errorOccurred, this, [](Error error) { qDebug() << error.message() << error.additionalMessage(); }); connect(m_surface, &Surface::loadStatusChanged, this, [](LoadStatus loadStatus) { qDebug() << "loadStatus:" << static_cast<int>(loadStatus); }); connect(m_surface, &Surface::locationToElevationCompleted, this, [](QUuid, double elevation) { qDebug() << elevation; }); connect(m_surface, &Surface::doneLoading, this, [this](Error error) { if (!error.isEmpty()) qDebug() << error.message() << error.additionalMessage(); qDebug() << "loaded"; connect(m_mapView, &MapGraphicsView::mouseClicked, this, [this](QMouseEvent& mouseEvent) { Point loc = m_mapView->screenToLocation(mouseEvent.x(), mouseEvent.y()); qDebug() << "locationToElevation: " << loc.toJson(); m_surface->locationToElevation(loc); }); }); connect(elevationSource, &ArcGISTiledElevationSource::doneLoading, this, [this](Error error) { if (!error.isEmpty()) qDebug() << error.message() << error.additionalMessage(); qDebug() << "elevationSource loaded"; m_surface->load(); }); elevationSource->load();
... View more
12-15-2017
06:08 AM
|
3
|
2
|
709
|
POST
|
Hi there, You should be able to give the text symbol an offset using the "setOffsetX" or "setOffsetY" methods: MarkerSymbol Class | ArcGIS for Developers. They are defined on the base type MarkerSymbol rather than on TextSymbol I hope that helps, Luke
... View more
11-23-2017
07:22 AM
|
0
|
0
|
431
|
POST
|
Sorry, Rainer that was my mistake - I've just looked at the API and what you have is correct. If you're able to post a little more of your code I can try and reproduce. Luke
... View more
10-04-2017
10:09 AM
|
0
|
0
|
702
|
POST
|
Hi Rainer, One thing you should check is that you are re-applying the attributes (a QVariantMap) to your Graphic after updating. The call to Graphic::attributes() returns by value and not by reference so if you do something like: auto graphicAttrList = myGraphic->attributes(); graphicAttrList->replaceAttribute();
you will need to make sure you follow that with a call to: myGraphic->setAttributes(graphicAttrList); I hope that helps, Luke
... View more
10-04-2017
07:27 AM
|
0
|
0
|
702
|
POST
|
I attached it to my reply above - are you not able to access that?
... View more
09-22-2017
07:17 AM
|
0
|
3
|
441
|
POST
|
Hi Nicholas, I've attached a zipped project with my code for the portal workaround which uses the AuthenticationView etc. Does that work for you?
... View more
09-22-2017
06:22 AM
|
0
|
5
|
441
|
POST
|
Hi Nicholas, yes ideally the view would work and allow you to provide the credentials. Can you (temporarily) create a Credential object with your user name and password and pass that to in the constructor of the Portal?
... View more
09-21-2017
09:33 AM
|
0
|
7
|
441
|
POST
|
Hi Nicholas - I think there may be an issue with logging in using the workflow you describe (I will log an issue to look into that). Here is some workaround code that will first authenticates using a portal - this works for me, so hopefully it should solve your problem. void ExportTiles::componentComplete() { QQuickItem::componentComplete(); // create Portal and load Portal* portal = new Portal(QUrl("https://arcgis.com"), true, this); connect(portal, &Portal::doneLoading, this, [this](Error e) { if (!e.isEmpty()) qDebug() << e.message() << e.additionalMessage(); else qDebug() << "portal loaded"; }); //portal->load(); // this will trigger an authentication challenge for AGOL credentials // find QML MapView component m_mapView = findChild<MapQuickView*>("mapView"); // create a tiled basemap ArcGISTiledLayer* tiledLayer = new ArcGISTiledLayer(m_serviceUrl, this); Basemap* basemap = new Basemap(tiledLayer, this); // create a new map instance m_map = new Map(basemap, this); // set an initial viewpoint Envelope env(11257744, 1682070, 11259005, 1683016, SpatialReference(3857)); Viewpoint viewpoint(env); m_map->setInitialViewpoint(viewpoint); // set map on the map view m_mapView->setMap(m_map); // create the task with the url and load it m_exportTileCacheTask = new ExportTileCacheTask(m_exportUrl, this); connect(m_exportTileCacheTask, &ExportTileCacheTask::doneLoading, this, [this](Error error) { if (!error.isEmpty()) { emit updateStatus("Export failed"); emit hideWindow(5000, false); } }); connect(m_mapView, &MapQuickView::viewpointChanged, this, [this]() { qDebug() << m_mapView->currentViewpoint(ViewpointType::BoundingGeometry).targetGeometry().toJson(); }); } The rest of your code should work as is hopefully - please let me know if this is working for you! Luke
... View more
09-21-2017
08:44 AM
|
0
|
9
|
521
|
Title | Kudos | Posted |
---|---|---|
1 | 05-04-2018 04:22 AM | |
1 | 11-02-2022 06:25 AM | |
1 | 07-12-2022 05:35 AM | |
4 | 10-21-2021 01:58 AM | |
1 | 07-12-2021 01:09 AM |
Online Status |
Offline
|
Date Last Visited |
03-25-2024
03:44 PM
|