|
POST
|
Thanks for reporting this issue. We are looking into this issue at our end. And it is definitely reproducible on some old machines. We will keep you posted on this one. -Nakul
... View more
06-06-2017
10:08 AM
|
0
|
0
|
881
|
|
POST
|
Yes, because it is not currently available for Android. With the upcoming release we will be officially supporting this feature out of the box for Android and iOS.
... View more
06-06-2017
09:24 AM
|
1
|
0
|
1929
|
|
POST
|
Actually, there will be only single sign in using the Portal named user in your app and the secured service should work without any further sign in since the credentials are stored within the item. Just like it does using the ArcGIS online or Portal.
... View more
06-06-2017
09:20 AM
|
0
|
0
|
1695
|
|
POST
|
So basically you are referring to a hosted secured feature service. Did you end up sharing the item to public? If you did then your underlying secured feature will work as the credentials (for the actual arcgis secured service) are stored within the item. And you should be able to access it. If you don't want this way. Then you have to go through the OAuth2 Authentication, because at this point it is not about ArcGIS Server secured service. I would recommend you to have a OAuth authentication login page for your app. Then you should be able to access the item
... View more
06-05-2017
10:09 AM
|
0
|
2
|
1695
|
|
POST
|
If you are new to Qml and programming in general. Then it will take some doing. You will need to replace the Webmap with the Map component and add the tpk file. For reference refer our sample "Local basemap (TPK) and features from GDB" to learn how to add tpk in the Map. -Nakul
... View more
06-05-2017
08:56 AM
|
1
|
2
|
2952
|
|
POST
|
Not right out of the box at this point. But if you would like you can customize the Quickreport Map page to use the tpk instead of a webmap. But in the future we are looking to bring this functionalitybuiltin to the QuickReport. -Nakul
... View more
06-05-2017
08:09 AM
|
1
|
1
|
2952
|
|
POST
|
At the time of configuring the Quickreport either on the website or desktop you are required to provide the feature service url. This is where the data gets added. For e.g. I hope this helps. Nakul
... View more
05-25-2017
08:09 AM
|
0
|
0
|
698
|
|
POST
|
To change the basemap. Please make the edit in the appinfo.json properties like below. That is where it picks the basemapServiceurl value "properties": {
"basemapServiceUrl": "http://server.arcgisonline.com/arcgis/rest/services/World_Imagery/MapServer",
"titleBackgroundColor": "#00b2ff",
"titleTextColor": "#fefdfd"
}, Also make sure your feature service layer has the editing permissions to add new features from the Feature Layer (hosted settings. Finally make sure the attributes match to attributes listed in the Add Point function code. I am sure your feature layer doesn't have the following attributes attributes: {
eventtype : "eventtype",
eventdate : "district",
eventtype: 17
}
... View more
05-24-2017
12:44 PM
|
1
|
1
|
2007
|
|
POST
|
Please revert the changes back to original code. You cannot replace basemapserviceurl with a webmap. So if you are interested in a specific basemap get the url and replace it with the one on line 70. But remember it is optional. Only thing you really need to change is the featureservice url on line 76. Also url of the layer must end with some index such as "0" which defines the Layer index. So the right url would be https://services1.arcgis.com/5Gtv38l8677OspKm/arcgis/rest/services/database_survey_join/FeatureServer/0 And it looks like your layer is secured which requires OAuth 2.0 authentication. For that please refer this Use OAuth 2.0 authentication—ArcGIS Runtime SDK for Qt | ArcGIS for Developers But for testing purpose just make your service publically available for brief moment and test the layer as mentioned above in the sample and you should be able to add and view features. I hope this helps. Nakul
... View more
05-24-2017
08:27 AM
|
1
|
3
|
2007
|
|
POST
|
There is no direct way available. But can be done through some code changes at the point of geometry collection. You can do a check to see if the geometry collected lies within the desired extent using "Geometry. within( geom)" method . If not then discard the geometry. Another way to force users to collect report within your desired area is to create and use a webmap which is only limited to your desired area. This way if they are outside the map area they cannot draw polyline and polygon geometry. For point geometry it uses the device location and that will fall outside the map area. At this point you can do a check.
... View more
05-23-2017
01:46 PM
|
1
|
0
|
845
|
|
POST
|
I am assuming you are using QuickReport template? If yes then are you using a feature service layer for which the editing is enabled, with permissions to create new features? -Nakul
... View more
05-16-2017
09:20 AM
|
0
|
0
|
935
|
|
POST
|
I am glad I was able to help you to resolve this issue. Cheers, Nakul
... View more
05-12-2017
08:04 AM
|
0
|
0
|
2050
|
|
POST
|
Yes, I generated the gdb locally, made no edits and closed the app. I then opened the app and watched the debug messages as it found the local gdb and gdb.valid returned false. Thats weird. As per your last message I thought issue could be related to editing. But now it seems some other issue since you are having the issue even when you don't make any edits. I have some sample code below. I am not doing any editing here. But it generates the geodatabase the first time. And next time it opens the same geodatabase without generating again. May be you wanna take a look at that and see if this helps. I can see about unregister/register. Is that a standard procedure for an offline editing app?Yes. But you don't have to. I was just suggesting to see if this can fix the problem. App {
id: app
width: 400
height: 640
property double scaleFactor: AppFramework.displayScaleFactor
property int fontSize: 15 * scaleFactor
property string featuresUrl: "http://services.arcgis.com/6DIQcwlPy8knb6sg/arcgis/rest/services/Campus_Tour_20140624_002207/FeatureServer"
property string dataPath: "~/ArcGIS/Runtime/Data/Test/t/"
property string gdbPath: ""
property var selectedFeatureId: null
property bool isAppOnline: AppFramework.network.isOnline
property int layerId:0
property bool syncEnabledInApp:false
Map {
id: mainMap
anchors {
left: parent.left
top: parent.top
right: parent.right
bottom: msgRow.top
}
focus: true
ArcGISTiledMapServiceLayer {
url: "http://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer"
}
onMouseClicked: {
if (!app.isOnline) {
offLineLayer.hitTestFeatures(mouse.x, mouse.y);
}
}
}
Column {
id: controlsColumn
anchors {
left: parent.left
top: parent.top
margins: 20 * scaleFactor
}
spacing: 7
}
Rectangle {
width: 200 * scaleFactor
height: 200 * scaleFactor
visible: attachmentsList.currentIndex != -1 ? true : false
color: "lightgrey"
radius: 5
border.color: "black"
opacity: 0.77
clip: true
ListView {
id: attachmentsList
property int itemHeight: 20
anchors {
fill: parent
margins: 5 * scaleFactor
}
visible: currentIndex != -1 ? true : false
header: Item {
height: attachmentsList.itemHeight * scaleFactor
width: parent.width
clip: true
Text {
text: "Attachments"; font { bold: true }
}
}
model: attachmentsModel
delegate: Item {
height: attachmentsList.itemHeight * scaleFactor
width: parent.width
clip: true
Text {
text: name
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
}
MouseArea {
id: itemMouseArea
anchors.fill: parent
onClicked: {
attachmentsList.currentIndex = index
var item = attachmentsList.model.get(attachmentsList.currentIndex);
local.viewAttachment(item["attachmentId"]);
}
}
}
highlightFollowsCurrentItem: true
highlight: Rectangle {
height: attachmentsList.currentItem.height
color: "lightsteelblue"
}
focus: true
}
}
ListModel {
id: attachmentsModel
}
Rectangle {
anchors {
fill: attachmentImage
margins: -10 * scaleFactor
}
visible: attachmentImage.visible
color: "black"
radius: 5
border.color: "black"
opacity: 0.77
}
Image {
id: attachmentImage
anchors {
fill: parent
margins: 20 * scaleFactor
}
visible: attachmentImage.source != "" ? true : false
fillMode: Image.PreserveAspectFit
MouseArea {
anchors.fill: parent
onClicked: {
attachmentImage.source = ""
}
}
}
FeatureLayer {
id: offLineLayer
selectionColor: "cyan"
function hitTestFeatures(x,y) {
offLineLayer.clearSelection()
attachmentsModel.clear()
var featureIds = offLineLayer.findFeatures(x, y, 1, 1);
if (featureIds.length > 0) {
selectedFeatureId = featureIds[0];
selectFeature(selectedFeatureId);
statusText.text = "Selected featureID is "+ selectedFeatureId;
//if(local.hasAttachments)
local.queryAttachmentInfos(selectedFeatureId);
// else
//statusText.text = qsTr("Feature Layer has no attachments")
}
}
onStatusChanged: {
if(status === Enums.LayerStatusInitialized) {
console.log("Layer initialized")
//console.log(JSON.stringify(serviceInfoTask.featureServiceInfo.fullExtent.json))
//console.log(serviceInfoTask.featureServiceInfo.initialExtent.toText())
//console.log(JSON.stringify(offLineLayer.extent.json))
if(isAppOnline)
mainMap.zoomTo(serviceInfoTask.featureServiceInfo.fullExtent)
else
mainMap.zoomTo(offLineLayer.extent)
}
}
}
FileInfo{
id:fileInfo
filePath: gdbPath
}
FileFolder {
id: tempFolder
}
GeodatabaseFeatureTable {
id: local
geodatabase: gdb.valid ? gdb : null
featureServiceLayerId: layerId
onQueryAttachmentInfosStatusChanged: {
if(queryAttachmentInfosStatus === Enums.QueryAttachmentInfosStatusCompleted){
console.log("got attachments")
var count = 0;
for (var attachmentInfo in local.attachmentInfos) {
var info = local.attachmentInfos[attachmentInfo];
attachmentsList.model.insert(count,
{
"attachmentId": info["attachmentId"],
"contentType": info["contentType"],
"name": info["name"],
"size": info["size"]
})
}
if (attachmentsList.count > 0)
attachmentsList.currentIndex = 0;
count++;
}
}
onRetrieveAttachmentStatusChanged: {
if (local.retrieveAttachmentStatus === Enums.RetrieveAttachmentStatusCompleted) {
if (local.retrieveAttachmentResult !== null) {
if (local.retrieveAttachmentResult !== null) {
if (Qt.platform.os === "windows") {
var tempPath = tempFolder.path.split(":")[1];
var str = local.retrieveAttachmentResult.saveToFile("file://" + tempPath, true);
attachmentImage.source = "file://" + str.split(":")[1];
} else {
var str2 = local.retrieveAttachmentResult.saveToFile("file://" + tempFolder.path, true);
attachmentImage.source = "file://" + str2;
}
}
}
} else if (local.retrieveAttachmentStatus === Enums.RetrieveAttachmentStatusErrored) {
statusText.text = "Retrieve Attachment error: " + featureLayer.featureTable.retrieveAttachmentError;
}
}
function viewAttachment(attachmentId) {
local.retrieveAttachment(selectedFeatureId, attachmentId);
}
}
Geodatabase {
id: gdb
path: gdbPath
onValidChanged: {
if (valid) {
var gdbtables = gdb.geodatabaseFeatureTables;
for(var i in gdbtables) {
console.log (gdbtables.featureServiceLayerName);
}
}
}
}
ServiceInfoTask {
id: serviceInfoTask
url: featuresUrl
onFeatureServiceInfoStatusChanged: {
if (featureServiceInfoStatus === Enums.FeatureServiceInfoStatusCompleted) {
if(!serviceInfoTask.featureServiceInfo.isSyncEnabled){
statusText.text = qsTr("Error- Feature Service doesn't have sync capability.");
return;
}
if(!serviceInfoTask.featureServiceInfo.layers[layerId].hasAttachments){
console.log("has no attachments")
statusText.text = qsTr("Error- Feature Layer doesn't support attachments.");
return;
}
//TODO: get the correct layer ID-unique one
//Get the featureservice name to append to the geodatabase.
statusText.text = qsTr("Feature Service info received for ",serviceInfoTask.featureServiceInfo.layers[layerId].name);
gdbPath = dataPath + serviceInfoTask.featureServiceInfo.layers[layerId].name + ".geodatabase"
console.log(gdbPath)
if(fileInfo.exists){
// perform sync -' Download only '
gdb.syncGeodatabaseParameters.syncDirection = Enums.SyncDirectionDownload
console.log("GDB valid ",gdb.valid)
if(gdb.valid){
if(syncEnabledInApp){
console.log("performing sync")
geodatabaseSyncTask.syncGeodatabase(gdb.syncGeodatabaseParameters, gdb);
busyIndicator.visible = true;
statusText.text = qsTr("Checking for any updates to download..");
}else{
// Add Local feature layer
offLineLayer.featureTable = local
mainMap.addLayer(offLineLayer)
}
}
}
else{
// Generate Geodatabase
generateGeodatabaseParameters.initialize(serviceInfoTask.featureServiceInfo);
generateGeodatabaseParameters.extent = mainMap.extent;
generateGeodatabaseParameters.returnAttachments = true;
busyIndicator.visible = true;
geodatabaseSyncTask.generateGeodatabase(generateGeodatabaseParameters, gdbPath,false);
statusText.text = qsTr("Downloading features with attachments for offline use..please wait");
}
} else if (featureServiceInfoStatus === Enums.FeatureServiceInfoStatusErrored) {
statusText.text = "Error:" + errorString;
//cancelButton.text = "Start Over";
}
}
}
GeodatabaseSyncStatusInfo {
id: syncStatusInfo
}
GeodatabaseSyncTask {
id: geodatabaseSyncTask
url: featuresUrl
onGenerateStatusChanged: {
statusText.text = generateStatus;
if (generateStatus === Enums.GenerateStatusCompleted) {
statusText.text = geodatabasePath;
//cancelButton.enabled = false;
busyIndicator.visible = false;
//statusText.text = "Select a feature";
//console.log("generation completed")
// Add Local feature layer
gdb.path = geodatabasePath;
offLineLayer.featureTable = local
mainMap.addLayer(offLineLayer)
} else if (generateStatus === GeodatabaseSyncTask.GenerateError) {
statusText.text = "Error: " + generateGeodatabaseError.message + " Code= " + generateGeodatabaseError.code.toString() + " " + generateGeodatabaseError.details;
//cancelButton.text = "Start Over";
}
}
onGeodatabaseSyncStatusInfoChanged: {
}
onSyncStatusChanged: {
if (syncStatus === Enums.SyncStatusCompleted) {
//cancelButton.enabled = false;
statusText.text = qsTr("Sync completed. Select features to view attachments.");
busyIndicator.visible = false;
// Add Local feature layer
offLineLayer.featureTable = local
mainMap.addLayer(offLineLayer)
}
if (syncStatus === Enums.SyncStatusErrored){
statusText.text = "Error: " + syncGeodatabaseError.message + " Code= " + syncGeodatabaseError.code.toString() + " " + syncGeodatabaseError.details +". Adding layer from the local storage";
busyIndicator.visible = false;
// if fails still add local feature layer from last synced results
offLineLayer.featureTable = local
mainMap.addLayer(offLineLayer)
}
if (syncStatus === Enums.SyncStatusInProgress) {
statusText.text = "Downloading the updates...please wait"
}
}
}
GenerateGeodatabaseParameters {
id: generateGeodatabaseParameters
}
Rectangle {
anchors {
fill: msgRow
leftMargin: -10 * scaleFactor
}
color: "lightgrey"
border.color: "black"
opacity: 0.77
}
Row {
id: msgRow
anchors {
bottom: parent.bottom
left: parent.left
leftMargin: 10 * scaleFactor
right: parent.right
}
spacing: 10 * scaleFactor
BusyIndicator {
id: busyIndicator
anchors.verticalCenter: parent.verticalCenter
enabled: false
visible: enabled
height: (parent.height * 0.5) * scaleFactor
width: height * scaleFactor
}
Text {
id: statusText
anchors.bottom: parent.bottom
width: parent.width
wrapMode: Text.WordWrap
font.pixelSize: fontSize
}
}
Rectangle {
anchors.fill: parent
color: "transparent"
border {
width: 0.5 * scaleFactor
color: "black"
}
}
Component.onCompleted: {
statusText.text = "Getting service info";
// If online
// Check for the local version if not available download one
// If available perform sync
if(isAppOnline)
serviceInfoTask.fetchFeatureServiceInfo();
// If offline use the local version only
// ToDO -ask user to choose the local geodatabase
}
}
... View more
05-11-2017
04:44 PM
|
0
|
2
|
2050
|
|
POST
|
Hmm. Couple of things to try 1) Can you confirm this workflow- generate geodatabase locally for the first time. Then close the app (no edits). Next time open the app and load the local geodatabase (instead of regenerating). And check if the gdd is valid this time? 2) Other thing u might wanna try is to unregister ur geodatabase after edits and sync is performed. Next time before you open the same local geodatabase. Make sure to register it again before reading the geodatabase using registerGeodatabase() ArcGIS Runtime SDK for Qt QML API: GeodatabaseSyncTask Class Reference
... View more
05-11-2017
12:26 PM
|
0
|
4
|
2050
|
|
POST
|
If your geodatabase is setup correctly it should return valid as true. Please check our Local geodatabase editing sample. That has the code for checking the gdb validity. -Nakul
... View more
05-09-2017
01:39 PM
|
0
|
6
|
2050
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 11-30-2022 08:20 AM | |
| 1 | 06-06-2017 09:24 AM | |
| 1 | 11-19-2019 05:32 PM | |
| 1 | 09-29-2017 04:37 PM | |
| 1 | 12-20-2017 11:02 AM |
| Online Status |
Offline
|
| Date Last Visited |
01-29-2026
08:38 AM
|