POST
|
Would connecting to the `errorOccurred` signal on either the mapview or image overlay help show when there is a spatial reference mismatch?
... View more
05-02-2025
04:06 AM
|
0
|
0
|
542
|
POST
|
https://doc.qt.io/qt-6/qimage.html#fill-2:~:text=If%20the%20depth%20of%20the%20image%20is%208%2C%20the%20image%20will%20be%20filled%20with%20the%20index%20corresponding%20the%20color%20in%20the%20color%20table%20if%20present%3B%20it%20will%20otherwise%20be%20filled%20with%200. You might need to set a value in the color table before the call to fill so that the Qimage works properly https://doc.qt.io/qt-6/qimage.html#setColorTable
... View more
05-01-2025
07:17 AM
|
0
|
0
|
569
|
POST
|
My map uses Qt, but the different Esri SDKs are mostly comparable so I am going to try to answer this. Feasible to display 2525D symbology? Yes. The term you want to look for in the documentation and samples is DictionaryRenderer. That is the renderer which uses a stylx file from Esri to display the 2525 symbols. Implementation? You have 2 options that I know of. Either Graphic/GraphicsOverlay or Feature/FeatureLayer. On both Graphic and Feature there is an attributes map of key/value pairs. For each you would want to set the "sidc" attribute to be the symbol id code from your data sources. Filtering? This is where the big difference between Graphic and Feature is in my eyes. With Graphic you would have to iterate through all the graphics and set the isVisible variable appropriately. With FeatureLayers there is a definitionExpression setting that can be set once for the entire layer as a sql where statement, probably looking at the different values for the different characters in the symbol id code specification. Updating in real time while filter is active? Yes that is just a matter of calling setGeometry on the specific Graphic/Feature as needed.
... View more
03-03-2025
05:07 AM
|
0
|
1
|
277
|
POST
|
https://community.esri.com/t5/qt-maps-sdk-questions/can-i-use-raster-function-mask-to-make-a-range-of/m-p/1171906 I asked about something similar a while back, @JamesBallard1 is there any progress on this?
... View more
03-03-2025
04:51 AM
|
1
|
1
|
811
|
POST
|
1.) Will any version of ArcGIS Runtime 100.x work with 6.5.2? ( I'm having a hard time finding the old system requirements) https://developers.arcgis.com/qt/v100/reference/system-requirements/ It did take me a little digging to find the old requirements. As I undertstand it, the switch from Qt5 to Qt6 was a large part of the reasoning for the 100 to 200 change. 2.) Will I have a hard time moving my current code using 100.13 to 200.3? I've already seen all the compile errors and wondering if it is possible with some code adjustment or is it really a gruesome process. Looking back at my notes from my changeover from 100 to 200, the big things for us were: using qmake6 instead of qmake Esri changed their includes in their headers so that they forward declare everything they can and then force your user classes to include pieces individually used. Or there is a single include compatability header that includes everything they have. Esri removed/updated some functions they had marked as deprecated for quite a while, like on the Error class they changed int error.code() to be [some enum] error.errorType() Converting a geometry to an envelope, you need to explicitly call .extent and not use the implicit conversion function Esri made some Geometry base class copy constructors explicit. They provided geometry_cast functions that does some checking on the type of the geometry. Qt5 to Qt6 had some changes for how some of their classes behaved, like in QMouseEvent and the parent classes for that. I'll just give one example. Runtime::VerticalAlignment had 6 parameters in 100.13 but 200.3 calls for two, etc Where is VerticalAlignment in the documentation? I see a function for setting that on TextSymbol and an enum named that, but those match up in both 100 and 200. Or am I looking at c++ documentation and you are looking at Qml or something like that?
... View more
07-24-2024
04:54 AM
|
3
|
3
|
1572
|
POST
|
So should the required version in https://developers.arcgis.com/qt/system-requirements/system-requirements-for-200-4/#:~:text=Framework%20for%20Linux-,6.5.1%20or%20higher,-Qt%20Creator be updated to be "6.5.1 to 6.5.5" ?
... View more
06-13-2024
07:10 AM
|
0
|
1
|
983
|
POST
|
Yes, check the samples for the generate offline map example https://github.com/Esri/arcgis-maps-sdk-samples-qt/tree/main/ArcGISRuntimeSDKQt_CppSamples/Maps/GenerateOfflineMap If you have a small simple shapefile or a mobile geodatabase for the area that your map will be used you can definitely load that in first on startup, then if the online map display call fails you cna keep it displayed. https://github.com/Esri/arcgis-maps-sdk-samples-qt/blob/main/ArcGISRuntimeSDKQt_CppSamples/DisplayInformation/SymbolizeShapefile/SymbolizeShapefile.cpp
... View more
06-03-2024
05:29 AM
|
1
|
0
|
983
|
BLOG
|
https://community.esri.com/t5/arcgis-maps-sdks-native-blog/let-s-build-with-swift-2-state-and-data-flow/ba-p/1290510 https://community.esri.com/t5/arcgis-maps-sdks-native-blog/let-s-build-with-swift-3-swift-concurrency/ba-p/1292146 https://community.esri.com/t5/arcgis-maps-sdks-native-blog/let-s-build-with-swift-4-view-modifier-and-reader/ba-p/1294852 @GregoryDurfee
... View more
04-15-2024
04:42 AM
|
1
|
0
|
682
|
POST
|
You likely want to use GeometryEngine::project to take your lambert point and transform it to wgs84. https://developers.arcgis.com/qt/cpp/api-reference/esri-arcgisruntime-geometryengine.html#project QObject::connect(&polylineBuilder,
&PolylineBuilder::errorOccurred,
[=](Error loadError)
{
cout << __LINE__ << " " << loadError.message().toStdString()
<< " " << loadError.additionalMessage().toStdString()
<< endl;
});
Point projectedPole = static_cast< Esri::ArcGISRuntime::Point >(GeometryEngine::project(northPole, spatialRefer_wgs)); Depending on the version of the Maps sdk you are using, you may need to do a geometry_cast to get a Point out of the Geometry parent class that is returned from the project call. also you can connect to the PolylineBuilder's errorOccurred signal to try to see what it is complaining about with the point adds
... View more
03-20-2024
05:05 AM
|
1
|
0
|
610
|
POST
|
@AndrewBladon made an excellent little sample app and turned it into an Esri blog post, https://www.esri.com/arcgis-blog/products/sdk-qt/developers/creating-app-to-identify-climbing-locations-using-weather-api/ With source code up on github, https://github.com/AndrewBladon/QtWeatherApp/tree/main That lead to me looking at the documentation for identifyGraphicsOverlayAsync ( https://developers.arcgis.com/qt/cpp/api-reference/esri-arcgisruntime-geoview.html#identifyGraphicsOverlayAsync ) , The documentation does not seem to have any warnings to developers that they need to manage the memory in the QFuture functor. Should it have the little "See also Returned QObjects Parenting." link to remind developers like the old identifyGraphicsOverlaysCompleted does? How could this app be improved with: unit tests on the setters and getters logic integration tests to see how the interaction with the classes in the app with a running Esri map code coverage to see how much of the code is exercised by tests a continuous integration setup? Mainly because in my day job we have our map app working and have "seen the light" on the usefulness of those processes. But we have done it our way and I would like to see someone else's pattern for these processes.
... View more
01-08-2024
07:57 AM
|
1
|
1
|
720
|
POST
|
My Esri conspiracy theory: none of the samples on github have error handling to keep people coming back to these forums as a way of increasing engagement with users. Since probably 70% of the questions on here would be clarified by printing out the error message.
... View more
10-17-2023
05:12 AM
|
0
|
1
|
1322
|
POST
|
I dont do android development, but is it possible to listen to the loadErrorChanged and loadStatusChanged signals for all your different components and then log somehow the errors that occurred? https://developers.arcgis.com/qt/qml/api-reference/qml-esri-arcgisruntime-loadable.html
... View more
10-16-2023
05:48 AM
|
0
|
0
|
1410
|
POST
|
Darn. Would the fix be in a 200.1.1 or in a 200.3+ delivery?
... View more
09-22-2023
03:42 AM
|
0
|
2
|
581
|
POST
|
Most of my samples are modified derivations of an older copy of the FeatureLayerShapefile sample from your github. I added a button in the top left that when clicked toggles the status of what it sends to setAttributionTextVisible. This toggle works on 200.0 but not on 200.1. The errorOccurred signal is not getting triggered also for the mapGraphicsView . main.cpp // Copyright 2017 Esri.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include <QApplication>
#include <QMessageBox>
#include "FeatureLayerShapefile.h"
#define STRINGIZE(x) #x
#define QUOTE(x) STRINGIZE(x)
int main(int argc, char *argv[])
{
QApplication application(argc, argv);
#ifdef Q_OS_WIN
// Force usage of OpenGL ES through ANGLE on Windows
QCoreApplication::setAttribute(Qt::AA_UseOpenGLES);
#endif
FeatureLayerShapefile applicationWindow;
applicationWindow.setMinimumWidth(800);
applicationWindow.setMinimumHeight(600);
applicationWindow.show();
return application.exec();
} FeatureLayerShapefile.h // [WriteFile Name=FeatureLayerShapefile, Category=Layers]
// [Legal]
// Copyright 2017 Esri.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// [Legal]
#ifndef FEATURELAYERSHAPEFILE_H
#define FEATURELAYERSHAPEFILE_H
namespace Esri
{
namespace ArcGISRuntime
{
class Map;
class MapGraphicsView;
class FeatureCollectionTable;
class FeatureCollection;
class FeatureCollectionLayer;
class Feature;
class UniqueValueRenderer;
class FeatureQueryResult;
} // namespace ArcGISRuntime
} // namespace Esri
class QPushButton;
#include <QWidget>
#include <Error.h>
class FeatureLayerShapefile : public QWidget
{
Q_OBJECT
public:
explicit FeatureLayerShapefile(QWidget *parent = nullptr);
~FeatureLayerShapefile() = default;
public slots:
void button1Pressed();
void errorOccurred(Esri::ArcGISRuntime::Error error);
private:
Esri::ArcGISRuntime::Map *m_map = nullptr;
Esri::ArcGISRuntime::MapGraphicsView *m_mapView = nullptr;
QPushButton *m_button = nullptr;
void createAndAddShapefileLayer();
};
#endif // FEATURELAYERSHAPEFILE_H FeatureLayerShapefile.cpp // [WriteFile Name=FeatureLayerShapefile, Category=Layers]
// [Legal]
// Copyright 2017 Esri.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// [Legal]
#include "FeatureLayerShapefile.h"
#include "Map.h"
#include "MapGraphicsView.h"
#include "ShapefileFeatureTable.h"
#include "FeatureLayer.h"
#include "Envelope.h"
#include "LayerListModel.h"
#include "Error.h"
#include "TaskWatcher.h"
#include <QFileInfo>
#include <iostream>
#include <QVBoxLayout>
#include <QPushButton>
using namespace std;
using namespace Esri::ArcGISRuntime;
FeatureLayerShapefile::FeatureLayerShapefile(QWidget *parent /* = nullptr */)
: QWidget(parent)
{
// Create a map using the Imagery with labels basemap
m_map = new Map(this);
// Create a map view, and pass in the map
m_mapView = new MapGraphicsView(m_map, this);
// Create the button to display the input dialog
m_button = new QPushButton("Do Something", this);
m_button->setStyleSheet("QPushbutton#text {color: black;}");
connect(m_button,
&QPushButton::clicked,
this,
&FeatureLayerShapefile::button1Pressed);
// Set up the UI
QVBoxLayout *vBoxLayout = new QVBoxLayout();
vBoxLayout->addWidget(m_mapView);
setLayout(vBoxLayout);
// Create and add the shapefile to the map
createAndAddShapefileLayer();
}
void FeatureLayerShapefile::createAndAddShapefileLayer()
{
// TODO download and update the path in this file
// from
// https://github.com/Esri/arcgis-runtime-samples-data/tree/master/shapefiles
QString dataPath = "../shapefiles/world-continents.shp";
// Create the ShapefileFeatureTable
ShapefileFeatureTable *featureTable =
new ShapefileFeatureTable(dataPath, this);
// Create the feature layer from the ShapefileFeatureTable
FeatureLayer *layer = new FeatureLayer(featureTable, this);
connect(layer,
&FeatureLayer::doneLoading,
this,
[this, layer](Error loadError)
{
cout << __LINE__ << " " << loadError.message().toStdString()
<< endl;
if (!loadError.isEmpty())
return;
// If the layer was loaded successfully, set the map extent to the
// full extent of the layer
m_mapView->setViewpointGeometry(layer->fullExtent());
});
connect(layer,
&FeatureLayer::errorOccurred,
this,
[this, layer](Error loadError)
{
cout << __LINE__ << " " << loadError.message().toStdString()
<< " " << loadError.additionalMessage().toStdString()
<< endl;
});
connect(featureTable,
&ShapefileFeatureTable::errorOccurred,
this,
[this, layer](Error loadError) {
cout << __LINE__ << " " << loadError.message().toStdString()
<< endl;
});
connect(m_mapView,
&MapGraphicsView::errorOccurred,
this,
[this, layer](Error loadError) {
cout << __LINE__ << " " << loadError.message().toStdString()
<< endl;
});
layer->load();
// Add the shapefile layer to the map
m_map->operationalLayers()->clear();
m_map->operationalLayers()->append(layer);
}
void FeatureLayerShapefile::errorOccurred(Esri::ArcGISRuntime::Error error)
{
printf("FeatureLayerShapefile::onErrorOccurred errorType = %d, domain = %d, "
"extendedErrorType = %d, %s %s\n",
(int)error.errorType(),
(int)error.domain(),
(int)error.extendedErrorType(),
error.message().toStdString().c_str(),
error.additionalMessage().toStdString().c_str());
}
void FeatureLayerShapefile::button1Pressed()
{
static bool shown = false;
shown = !shown;
cout << "button1Pressed shown = " << shown << endl;
m_mapView->setAttributionTextVisible(shown);
m_mapView->update();
}
... View more
09-19-2023
12:03 PM
|
0
|
4
|
1948
|
Title | Kudos | Posted |
---|---|---|
1 | 03-03-2025 04:51 AM | |
3 | 07-24-2024 04:54 AM | |
1 | 04-15-2024 04:42 AM | |
1 | 06-03-2024 05:29 AM | |
1 | 03-20-2024 05:05 AM |
Online Status |
Offline
|
Date Last Visited |
06-20-2025
06:56 AM
|