Offline Table editing qml/qt

1793
5
Jump to solution
02-09-2016 08:04 AM
tanerkoka1
Occasional Contributor

Hi,

Can I offline editing (GeodatabaseFeatureServiceTable ) table  without shape in qt/qml ?

Thanks.

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
tanerkoka1
Occasional Contributor

Hi,

Problem was solved I'm using GenerateGeodatabaseParameters layerIds property before generate offline geodatabase like below with bold text:

        Button {

            id: generateButton

            text: "Generate Geodatabase"

            enabled: false

            style: ButtonStyle {

                label: Text {

                    text: control.text

                    color: control.enabled ? "black" : "grey"

                    horizontalAlignment: Text.AlignHCenter

                }

            }

            onClicked: {

                generateGeodatabaseParameters.initialize(serviceInfoTask.featureServiceInfo);

                generateGeodatabaseParameters.extent = mainMap.extent;

                generateGeodatabaseParameters.layerIds=[18];  (Table id)

                generateGeodatabaseParameters.returnAttachments = false;

                statusText.text = "Starting generate geodatabase task";

                geodatabaseSyncTask.generateGeodatabase(generateGeodatabaseParameters, gdbPath);

            }

        }

View solution in original post

0 Kudos
5 Replies
LucasDanzinger
Esri Frequent Contributor

Yes, you should be able to do this.

0 Kudos
tanerkoka1
Occasional Contributor

Hı,

How can I do this ? Can we use same Class's like Arcgis Runtime SDK for QT examples in Local Geodatabase editing or can we use some spatial  Class's for table aditing in offline mod.

Thanks

0 Kudos
LucasDanzinger
Esri Frequent Contributor

If your service has a mixture of spatial and non-spatial layers that are editable in it, you should be able to use the GeodatabaseSyncTask to generate a local geodatabase, similar to the Local Geodatabase Editing sample. Then, create a GeodatabaseFeatureTable from the non-spatial table, and edit just the same as a spatial table. The only difference is that you cannot edit the geometry, as the non-spatial table will not even have geometry.

0 Kudos
tanerkoka1
Occasional Contributor

Hı,

How to create a GeodatabaseFeatureTable from the non-spatial table?I only acces in FeatureLayer's in geodatabase in download not table's .Are there any code or example how do download tables without geometry?  Here is below my GeodatabaseFeatureTable and Geodatabase

    GeodatabaseFeatureTable {

        id: local

        geodatabase: gdb.valid ? gdb : null

        featureServiceLayerId:18 (Table)

    }

Geodatabase {

id: gdb

path: geodatabaseSyncTask.geodatabasePath

onValidChanged:
{
if (valid)
{

var gdbtables = gdb.geodatabaseFeatureTables;
for(var i in gdbtables)
{
   console.log (gdbtables[i].featureServiceLayerName);
}

     }

   }

}

0 Kudos
tanerkoka1
Occasional Contributor

Hi,

Problem was solved I'm using GenerateGeodatabaseParameters layerIds property before generate offline geodatabase like below with bold text:

        Button {

            id: generateButton

            text: "Generate Geodatabase"

            enabled: false

            style: ButtonStyle {

                label: Text {

                    text: control.text

                    color: control.enabled ? "black" : "grey"

                    horizontalAlignment: Text.AlignHCenter

                }

            }

            onClicked: {

                generateGeodatabaseParameters.initialize(serviceInfoTask.featureServiceInfo);

                generateGeodatabaseParameters.extent = mainMap.extent;

                generateGeodatabaseParameters.layerIds=[18];  (Table id)

                generateGeodatabaseParameters.returnAttachments = false;

                statusText.text = "Starting generate geodatabase task";

                geodatabaseSyncTask.generateGeodatabase(generateGeodatabaseParameters, gdbPath);

            }

        }

View solution in original post

0 Kudos