|
IDEA
|
Has anyone here tried using some of our existing cross platform technologies, such as Qt, Xamarin, or AppStudio? Do you have specific projects planned that require Flutter? Please share any details about why this cross platform solution is required as opposed to one of the solutions that we already support today.
... View more
12-17-2019
08:24 AM
|
0
|
1
|
6609
|
|
POST
|
You could use FileInfo object to check if the file exists in the callback, and if not, display some other image. Here is an example: import QtQuick 2.6
import QtQuick.Controls 2.2
import Esri.ArcGISRuntime 100.6
import Esri.ArcGISExtras 1.1
ApplicationWindow {
id: appWindow
width: 800
height: 600
MapView {
anchors.fill: parent
Map {
Basemap {
id: basemapFilePrefix
onErrorChanged: console.log("Basemap error: " + error.message + " (" + error.additionalMessage + ")");
SpatialReference {
wkid: 4326
}
ImageTiledLayer {
id: customTiledLayerFilePrefix
onErrorChanged: console.log("ImageTiledLayer error: " + error.message + " (" + error.additionalMessage + ")");
fullExtent: Envelope {
spatialReference: SpatialReference { wkid: 3857 }
xMin: -20037508.342789244
xMax: 20037285.703807656
yMin: -20037471.205137063
yMax: 20037471.205137063
}
noDataTileBehavior: Enums.NoDataTileBehaviorShow
tileInfo: TileInfo {
dpi: 96
format: Enums.TileImageFormatJPG
origin: Point {
spatialReference: SpatialReference { wkid: 3857 }
x: -20037508.342789244
y: 20037508.368847027
}
spatialReference: SpatialReference { wkid: 3857 }
LevelOfDetail {
level: 0
resolution: 156543
scale: 591658000
}
LevelOfDetail {
level: 1
resolution: 78271.5
scale: 295829000
}
LevelOfDetail {
level: 2
resolution: 39135.8
scale: 147914000
}
tileHeight: 256
tileWidth: 256
}
tileCallback: function(level, row, column) {
var localUrl = System.userHomePath + "/ArcGIS/Runtime/UnitTests/tiledata/" + level + "-" + row + "-" + column + ".jpg";
fileInfo.filePath = localUrl.substring(7);
if (fileInfo.exists) {
return localUrl;
} else {
return System.userHomePath + "/ArcGIS/Runtime/UnitTests/tiledata/nodata.jpg";
}
}
}
}
}
}
FileInfo {
id: fileInfo
}
}
... View more
12-17-2019
07:59 AM
|
1
|
1
|
1472
|
|
POST
|
I believe if you want to directly set the token string, you may need to also set the referer property - Credential QML Type | ArcGIS for Developers . Are you re-generating tokens somewhere else in your app? If you provide username and password instead, the credentials will be stored in the CredentialCache, and expired tokens will be automatically handled in the API. With your workflow, if your token expires, you'll need to handle fetching a new token and providing it to the Runtime API
... View more
12-16-2019
10:40 AM
|
0
|
2
|
2043
|
|
POST
|
Laurynas- Because a Map can contain layers and tables that are also secured, you can't directly set a credential on the Map. Instead, you need to use our AuthenticationManager, which is a class that catches all security challenges and notifies the developer, allowing the developer to satisfy the challenge (pass in a credential to the request). This is discussed further here - Access the ArcGIS platform—ArcGIS Runtime SDK for Qt | ArcGIS for Developers Example code would be: ApplicationWindow {
id: appWindow
width: 800
height: 600
// add a mapView component
MapView {
id: mv
anchors.fill: parent
// add a map to the mapview
Map {
initUrl: "securedWebmapUrl"
}
}
Connections {
target: AuthenticationManager // singleton instance
onAuthenticationChallenge: {
console.log("authentication challenge for", challenge.requestUrl)
if (challenge.authenticationChallengeType === Enums.AuthenticationChallengeTypeUsernamePassword) {
var credential = ArcGISRuntimeEnvironment.createObject("Credential", {
username: "username",
password: "password"
});
challenge.continueWithCredential(credential);
}
}
}
} If you wanted to instead show a user a dialog to sign in, you could use our Toolkit component called AuthenticationView: import QtQuick 2.6
import QtQuick.Controls 2.2
import QtPositioning 5.12
import Esri.ArcGISRuntime 100.6
import Esri.ArcGISRuntime.Toolkit.Dialogs 100.6
ApplicationWindow {
id: appWindow
width: 800
height: 600
// add a mapView component
MapView {
id: mv
anchors.fill: parent
// add a map to the mapview
Map {
initUrl: "secureWebmapUrl"
}
}
AuthenticationView {
authenticationManager: AuthenticationManager
}
}
... View more
12-16-2019
10:05 AM
|
0
|
4
|
2043
|
|
POST
|
I think some of the concepts here are tripping you up a bit. Geodatabase: This is the container, similar to a File Geodatabase in desktop, which holds N number of feature tables (called "feature class" in the desktop). GeodatabaseFeatureTable: These live inside of the Geodatabase. This is the backing data, schema information, rendering info, and everything required to define each table of features. This is synonymous to a Feature Class in desktop FeatureLayer: This is the layer that does the display of a feature table. The feature table is the backing data (i.e. the model) and the feature layer is what displays on the map (i.e. the view) So at a high level, what I would do is: - Create a Geodatabase for each .geodatabase file you have. - Load each Geodatabase and loop through each to obtain each feature table - Create a feature layer from each feature table - Add each feature layer to the map - Somehow, store a reference to the specific layers you want to mention. The first idea that comes to mind is to store a json or some data structure that keeps track of the index position of the layer added to the map. In my snippet above where I call get and pass in 0, that is just getting the first item in the map. If you store the index for the specific layers you want to have visibility toggled for, you could hard code those in your button. If you instead wanted to be more dynamic and display a toggle checkbox for each layer in the map, you could create a ListView in QML code, and bind the model property directly to the map's operationalLayers list model, and each layer would display in the ListView.
... View more
12-13-2019
10:36 AM
|
2
|
0
|
729
|
|
POST
|
Nothing new. Do you have details of your workflow and what you are trying to achieve that you can't currently achieve?
... View more
12-13-2019
09:24 AM
|
0
|
0
|
3237
|
|
POST
|
You could do something like: onClicked:{
if (checked == true){
map.operationalLayers.get(0).visible = true
}else if (checked == false){
map.operationalLayers.get(0).visible = false
}else{
console.log("something");
}
}
... View more
12-12-2019
11:12 AM
|
0
|
2
|
729
|
|
POST
|
scene->setSceneViewTilingScheme(SceneViewTilingScheme::Geographic);
... View more
12-12-2019
07:32 AM
|
1
|
0
|
2388
|
|
POST
|
You could loop through the geodatabaseFeatureTables list: Geodatabase {
id: gdb
path: dataPath + "geodatabase/LA_Trails.geodatabase"
onErrorChanged: console.log(error.message)
onLoadStatusChanged: {
if (loadStatus === Enums.LoadStatusLoaded) {
console.log("number of feature tables:", geodatabaseFeatureTables.length)
for (var i = 0; i < geodatabaseFeatureTables.length; i++) {
var ft = geodatabaseFeatureTables[i];
var fl = ArcGISRuntimeEnvironment.createObject("FeatureLayer", {featureTable: ft});
map.operationalLayers.append(fl);
}
}
}
Component.onCompleted: load()
}
... View more
12-12-2019
07:30 AM
|
0
|
6
|
2692
|
|
POST
|
Did you try setting mouseTracking on the view? The following works for me: m_sceneView = new SceneGraphicsView(scene, this);
m_sceneView->setMouseTracking(true);
connect(m_sceneView, &SceneGraphicsView::mouseMoved, this, [this](QMouseEvent e)
{
qDebug() << e.x() << e.y();
});
... View more
12-12-2019
07:09 AM
|
0
|
2
|
1073
|
|
POST
|
SceneView supports Web Mercator by default. If you set the scene view tiling scheme to WGS 84 first, does it work? Scene Class | ArcGIS for Developers
... View more
12-11-2019
07:24 AM
|
0
|
2
|
2388
|
|
POST
|
There is no addLayer method on Map. Instead, you can nest the layer inside the Map like you mentioned, or you can call map.operationalLayers.append(), and add the layer via that method LayerListModel QML Type | ArcGIS for Developers .
... View more
12-10-2019
11:33 AM
|
0
|
2
|
2692
|
|
POST
|
There aren't any convenience APIs available to convert a 2D map to a 3D scene. You'll need to create new layer instances and add those to a new scene.
... View more
12-10-2019
08:15 AM
|
0
|
6
|
2388
|
|
POST
|
MouseArea will only work if nested under a MapView or SceneView. If you are trying to identify an individual graphic on a mouse movement, you could try calling MapView.identifyGraphicsOverlay() on one of the mouse move signals
... View more
12-02-2019
10:46 AM
|
0
|
4
|
3895
|
| Title | Kudos | Posted |
|---|---|---|
| 3 | 05-27-2026 09:52 AM | |
| 1 | 11-24-2025 10:45 AM | |
| 1 | 07-30-2025 08:26 AM | |
| 1 | 05-15-2025 07:35 AM | |
| 2 | 11-26-2024 01:27 PM |
| Online Status |
Offline
|
| Date Last Visited |
3 weeks ago
|