|
POST
|
I am doing this right now... I am trying to set the Feature layer visible to FALSE and when I move the switch it turns it one... Although when I start the app it draws the features and is visible...the visible setting does not seem to be working.... Am I going about this correctly? Should I be using the Feature Layer Shell???? This gets even ore confusing when I add in another geodatabase with other feature tables...how do i specifically target those? FeatureLayer {
id: wmas_1
visible: false
Geodatabase {
id: gdb
path: lecaDataPathWMAs
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);
}
}
}
}
} T.Switch {
// SNIP
onClicked:{
if (checked == true){
wmas_1.visible = true
}else if (checked == false){
wmas_1.visible = false
}else{
console.log("xxxxx");
}
}
}
... View more
12-13-2019
09:26 AM
|
0
|
0
|
748
|
|
POST
|
I will have a couple geodatabases on the phone. There will be a couple buttons/sliders in the app to turn on specific layers from specific geodatabases How do I distinguish between the geodatabases and features in the geodatabase with the onclick of the button or slider. I dont see you referencing the specific geodatabase and I assume the get(0) is getting the first reference index in the geodatabase?
... View more
12-12-2019
12:55 PM
|
0
|
0
|
748
|
|
POST
|
Wondering how I replicate the button turning the layer off with your example....I like your example much more as it streamlines the process considerably.... Can I do this on the Geodatabase in your example? Set to false and then hit up the ID to set the visibility to true as in my example? visible: false
Right now I am doing it individually with in a Feature Layer. FeatureLayer {
id: wmas_1
visible: false
featureTable: gdb4.geodatabaseFeatureTablesByTableName["WMA_features"]
// create the geodatabase
Geodatabase {
id: gdb4
path: DataPathWMAs
onErrorChanged: errorMessage = error.message;
}
onErrorChanged: errorMessage = error.message;
} On a button I turn it on and off as such onClicked:{
if (checked == true){
wmas_1.visible = true
}else if (checked == false){
wmas_1.visible = false
}else{
console.log("something");
}
}
... View more
12-12-2019
10:55 AM
|
0
|
3
|
748
|
|
POST
|
So your example would read the geodatabase and create multiple Feature Layer objects to display the multiple features in the geodatabase?
... View more
12-12-2019
10:21 AM
|
0
|
5
|
2742
|
|
POST
|
Any idea how to read this geodatabase and or get a list of the features that it contains?
... View more
12-12-2019
06:41 AM
|
0
|
7
|
2742
|
|
POST
|
Think I got it...THANK YOU SO MUCH..... Seems I could not use featureTable: gdb.geodatabaseFeatureTableByLayerId(4); But had to use featureTable: gdb.geodatabaseFeatureTablesByTableName["WMAs_1"]; import QtQuick 2.6
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3
import Esri.ArcGISRuntime 100.6
//import Esri.ArcGISExtras 1.1
Rectangle {
id: navigateOnline
width: 800
height: 600
property string errorMessage: ""
signal previous(string message)
property string lecaDataPath: app.mmpkManager.fileUrl3
// Map view UI presentation at top
MapView {
anchors.fill: parent
Rectangle{
id: stupidrectangle
width: 300
height: 50
Column{
id: searchBar22
width: 300
spacing: 0
Text {
text: lecaDataPath
width: 300
wrapMode: Text.WordWrap
}
}
}
Map {
id: map
// set an initial viewpoint
ViewpointCenter {
Point {
x: -8778929
y: 44521052
spatialReference: SpatialReference { wkid: 3857 }
}
targetScale: 35e4
}
BasemapTopographic {}
//! [FeatureLayer Geodatabase create]
// create a feature layer
FeatureLayer {
// obtain the feature table from the geodatabase by name
//featureTable: gdb.geodatabaseFeatureTableByLayerId(4);
featureTable: gdb.geodatabaseFeatureTablesByTableName["WMAs_1"]
// create the geodatabase
Geodatabase {
id: gdb
path: lecaDataPath
onErrorChanged: errorMessage = error.message;
}
onErrorChanged: errorMessage = error.message;
}
onErrorChanged: errorMessage = error.message;
}
onErrorChanged: errorMessage = error.message;
}
Dialog {
modal: true
x: Math.round(parent.width - width) / 2
y: Math.round(parent.height - height) / 2
standardButtons: Dialog.Ok
visible: text.length > 0
property alias text : textLabel.text
property alias informativeText : detailsLabel.text
ColumnLayout {
Text {
id: textLabel
text: errorMessage
}
Text {
id: detailsLabel
text: "Please consult the README.md"
}
}
}
}
... View more
12-10-2019
01:55 PM
|
0
|
0
|
2742
|
|
POST
|
can I still reference the index of the gdb like this featureTable: geodatabase.geodatabaseFeatureTableByLayerId(4);
OK going to test that now. THANKS
... View more
12-10-2019
12:36 PM
|
0
|
0
|
2742
|
|
POST
|
I created a geodatabase via ArcGIS Runtime Content in ArcMap. I am trying to add it via this reference: Create an offline map—ArcGIS Runtime SDK for Qt | ArcGIS for Developers BUT map.addLayer does not exist or its giving me an error Any ideas? //Declare the geodatabase
Geodatabase {
id: geodatabase
path: "/path_to_my_geodatabase/mydata.geodatabase"
}
FeatureLayer {
id: featureLayer
featureTable: geodatabase.geodatabaseFeatureTableByLayerId(0);
}
map.addLayer(featureLayer);
... View more
12-10-2019
06:50 AM
|
0
|
14
|
3612
|
|
POST
|
Everything was correct in my last example but needed to change it to this ANY questions please ask.... WRONG if (selectedFeature.loadStatus === Enums.LoadStatusLoaded) {
selectedFeature.attachments.addAttachment(imagesFolder.filePath, "application/octet-stream", "captureTest.jpg");
} CORRECT if (selectedFeature.loadStatus === Enums.LoadStatusLoaded) {
selectedFeature.attachments.addAttachment(camera.imageCapture.capturedImagePath, "application/octet-stream", "captureTest.jpg");
}
... View more
11-19-2019
08:51 AM
|
2
|
0
|
2146
|
|
POST
|
THINK I JUST GOT IT...ONE Second testing now... really excited.
... View more
11-19-2019
07:33 AM
|
0
|
1
|
2146
|
|
POST
|
OK....From the example onClicked in the camera window I see this: MouseArea {
anchors.fill: parent;
onClicked: {
camera.imageCapture.captureToLocation(imagesFolder.filePath("captureTest.jpg"));
}
}
FileFolder {
id: imagesFolder
}
I am then trying to grab that image and attach it to a selected feature.....but something is not working as it does not upload the image to that feature.... if (selectedFeature.loadStatus === Enums.LoadStatusLoaded) {
selectedFeature.attachments.addAttachment(imagesFolder.filePath, "application/octet-stream", "captureTest.jpg");
} Does the syntax look correct? I can do this with the example that pops up the dialog box and I select the image from my phone and that works fine although the code is more like this Having a hard time integrating the two ways to attach an image. ANY IDEAS? DocumentDialog {
id: fileDialog
function doAddAttachment(){
if (selectedFeature.loadStatus === Enums.LoadStatusLoaded) {
selectedFeature.onLoadStatusChanged.disconnect(doAddAttachment);
selectedFeature.attachments.addAttachment(fileDialog.filePath, "application/octet-stream", fileInfo.fileName);
}
}
onAccepted: {
// add the attachment to the feature table
fileInfo.url = filePath
if (selectedFeature.loadStatus === Enums.LoadStatusLoaded) {
selectedFeature.attachments.addAttachment(filePath, "application/octet-stream", fileInfo.fileName);
} else {
selectedFeature.onLoadStatusChanged.connect(doAddAttachment);
selectedFeature.load();
}
console.log(filePath)
}
}
//! [EditFeatures add attachment from a file dialog]
MessageDialog {
id: msgDialog
}
// file info used for obtaining the file name
FileInfo {
id: fileInfo
}
//Show storage permission pop-up on Android
FileFolder {
id: fileFolder
path: AppFramework.userHomePath
}
Component.onCompleted: {
fileFolder.makeFolder()
}
... View more
11-19-2019
06:18 AM
|
0
|
2
|
2146
|
|
POST
|
Erwin Are you actually able to see the image on your mobile device?
... View more
11-13-2019
07:57 AM
|
0
|
0
|
2146
|
|
POST
|
Can you go to that location on your phone and see the image file there? I cannot find the image anywhere on my phone after taking the picture....hmmmm
... View more
11-08-2019
05:38 AM
|
0
|
0
|
2146
|
|
POST
|
Thats what I thought....common sense right? ahahah I cant find the image anywhere on my phone after taking the image....will check again....
... View more
11-07-2019
05:53 AM
|
0
|
0
|
2146
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 09-20-2018 11:09 AM | |
| 1 | 09-10-2018 06:26 AM | |
| 1 | 09-15-2022 11:02 AM | |
| 1 | 05-21-2021 07:35 AM | |
| 1 | 08-09-2022 12:39 PM |
| Online Status |
Offline
|
| Date Last Visited |
09-19-2022
09:23 PM
|