|
POST
|
From a very basic test that I wrote, this works for me. Can you share some code? Did you include QGeoCoordinate?
... View more
08-10-2016
11:09 AM
|
0
|
2
|
1486
|
|
POST
|
Taner, The following code works for me, so in general, it does work to have a polygon as your extent in the generate task import QtQuick 2.3
import QtQuick.Controls 1.2
import QtQuick.Controls.Styles 1.2
import ArcGIS.Extras 1.0
import ArcGIS.Runtime 10.26
ApplicationWindow {
id: root
width: 700
height: width
property double scaleFactor: System.displayScaleFactor
property int fontSize: 15 * scaleFactor
property bool isOnline: true
property string featuresUrl: "http://sampleserver6.arcgisonline.com/arcgis/rest/services/Sync/WildfireSync/FeatureServer"
property string gdbPath: "~/ArcGIS/Runtime/Data/Test/offlineSample.geodatabase"
property var selectedFeatureId: null
Envelope {
id: sfExtent
xMin: -13643665.582273144
yMin: 4533030.152110769
xMax: -13618899.985108782
yMax: 4554203.2089457335
spatialReference: mainMap.spatialReference
}
Polygon {
id: samplePolygon
}
Map {
id: mainMap
anchors.fill: parent
focus: true
ArcGISTiledMapServiceLayer {
url: "http://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer"
}
FeatureLayer {
id: offLineLayer
featureTable: root.isOnline ? featureServiceTable : local
selectionColor: "cyan"
function hitTestFeatures(x,y) {
var tolerance = Qt.platform.os === "ios" || Qt.platform.os === "android" ? 4 : 1;
var featureIds = offLineLayer.findFeatures(x, y, tolerance * scaleFactor, 1);
if (featureIds.length > 0) {
selectedFeatureId = featureIds[0];
selectFeature(selectedFeatureId);
statusText.text = "Tap anywhere to move the feature";
}
}
}
GraphicsLayer {
id: graphicsLayer
}
onMouseClicked: {
if (!root.isOnline) {
if (offLineLayer.isFeatureSelected(selectedFeatureId)) {
var featureToEdit = offLineLayer.featureTable.feature(selectedFeatureId);
featureToEdit.geometry = mouse.mapPoint;
offLineLayer.featureTable.updateFeature(selectedFeatureId, featureToEdit);
offLineLayer.unselectFeature(selectedFeatureId);
selectedFeatureId = null;
syncButton.enabled = true;
statusText.text = "Tap on Sync to update the Feature Service with the edits";
} else
offLineLayer.hitTestFeatures(mouse.x, mouse.y);
}
}
onStatusChanged: {
if (status === Enums.MapStatusReady) {
samplePolygon.startPath(-7994031.11, 5092024.86);
samplePolygon.lineTo(-7992530.05, 4952426.28);
samplePolygon.lineTo(-7864939.95, 4951675.75);
samplePolygon.lineTo(-7831916.63, 5069508.96);
samplePolygon.lineTo(-7832667.16, 5166327.33);
samplePolygon.lineTo(-7864189.42, 5233124.5);
samplePolygon.lineTo(-7897963.27, 5071010.02);
samplePolygon.lineTo(-7969263.62, 5131052.42);
samplePolygon.lineTo(-8045817.68, 5119043.94);
samplePolygon.lineTo(-8057826.16, 5045492);
var graphicClone = polygonGraphic.clone();
graphicClone.geometry = samplePolygon;
graphicsLayer.addGraphic(graphicClone);
}
}
Graphic {
id: polygonGraphic
symbol: SimpleFillSymbol {
color: Qt.rgba(0.5, 0, 0.0, 0.25)
outline: SimpleLineSymbol {
color: "red"
style: Enums.SimpleLineSymbolStyleSolid
width: 2
}
}
}
GeodatabaseFeatureTable {
id: local
geodatabase: gdb.valid ? gdb : null
featureServiceLayerId: 0
}
GeodatabaseFeatureServiceTable {
id: featureServiceTable
url: featuresUrl + "/0"
}
ServiceInfoTask {
id: serviceInfoTask
url: featuresUrl
onFeatureServiceInfoStatusChanged: {
if (featureServiceInfoStatus === Enums.FeatureServiceInfoStatusCompleted) {
statusText.text = "Service info received. Tap on the Generate Geodatabase Button";
generateButton.enabled = true;
} else if (featureServiceInfoStatus === Enums.FeatureServiceInfoStatusErrored) {
statusText.text = "Error:" + errorString;
generateButton.enabled = false;
cancelButton.text = "Start Over";
}
}
}
Feature {
id: featureToEdit
}
Rectangle {
anchors {
fill: controlsColumn
margins: -10 * scaleFactor
}
color: "lightgrey"
radius: 5 * scaleFactor
border.color: "black"
opacity: 0.77
MouseArea {
anchors.fill: parent
onClicked: (mouse.accepted = true)
}
}
Column {
id: controlsColumn
anchors {
left: parent.left
top: parent.top
margins: 20 * scaleFactor
}
spacing: 7
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 = samplePolygon;
generateGeodatabaseParameters.returnAttachments = false;
statusText.text = "Starting generate geodatabase task";
geodatabaseSyncTask.generateGeodatabase(generateGeodatabaseParameters, gdbPath);
}
}
Button {
id: syncButton
text: "Sync"
width: generateButton.width
enabled: false
style: generateButton.style
onClicked: {
enabled = false;
geodatabaseSyncTask.syncGeodatabase(gdb.syncGeodatabaseParameters, gdb);
statusText.text = "Starting sync task";
}
}
Button {
id: cancelButton
text: "Cancel"
width: generateButton.width
enabled: false
style: generateButton.style
onClicked: {
geodatabaseSyncTask.cancelJob(syncStatusInfo);
enabled = false;
text = "Cancel";
}
}
Row {
id: toggleOnlineOffline
spacing: 10
Text {
id: onlineStatus
text: root.isOnline ? " Online " : " Offline "
color: "black"
}
Switch {
id: switchToggle
checked: root.isOnline
enabled: false
onCheckedChanged: {
root.isOnline = checked;
if (checked === true && Enums.GenerateStatusCompleted)
statusText.text = "Switch to Offline Mode to continue editing.";
else if (checked === false && Enums.GenerateStatusCompleted)
statusText.text = "Select a feature.";
}
}
}
}
Geodatabase {
id: gdb
path: geodatabaseSyncTask.geodatabasePath
onValidChanged: {
if (valid) {
var gdbtables = gdb.geodatabaseFeatureTables;
for(var i in gdbtables) {
console.log (gdbtables.featureServiceLayerName);
}
}
}
}
GeodatabaseSyncStatusInfo {
id: syncStatusInfo
}
GeodatabaseSyncTask {
id: geodatabaseSyncTask
url: featuresUrl
onGenerateStatusChanged: {
if (generateStatus === Enums.GenerateStatusCompleted) {
statusText.text = geodatabasePath;
cancelButton.enabled = false;
generateButton.enabled = false;
root.isOnline = false;
statusText.text = "Select a feature";
} else if (generateStatus === GeodatabaseSyncTask.GenerateError) {
statusText.text = "Error: " + generateGeodatabaseError.message + " Code= " + generateGeodatabaseError.code.toString() + " " + generateGeodatabaseError.details;
generateButton.enabled = false;
cancelButton.text = "Start Over";
}
}
onGeodatabaseSyncStatusInfoChanged: {
if (geodatabaseSyncStatusInfo.status === Enums.GeodatabaseStatusUploadingDelta) {
var deltaProgress = geodatabaseSyncStatusInfo.deltaUploadProgress/1000;
var deltaSize = geodatabaseSyncStatusInfo.deltaSize/1000;
statusText.text = geodatabaseSyncStatusInfo.statusString + " " + String(deltaProgress) + " of " + String(deltaSize) + " KBs...";
} else
statusText.text = geodatabaseSyncStatusInfo.statusString + "...";
if (geodatabaseSyncStatusInfo.status !== GeodatabaseSyncStatusInfo.Cancelled)
cancelButton.enabled = true;
syncStatusInfo.json = geodatabaseSyncStatusInfo.json;
}
onSyncStatusChanged: {
featureServiceTable.refreshFeatures();
if (syncStatus === Enums.SyncStatusCompleted) {
cancelButton.enabled = false;
syncButton.enabled = false;
statusText.text = "Sync completed. You may continue editing the features.";
switchToggle.enabled = true;
}
if (syncStatus === Enums.SyncStatusErrored)
statusText.text = "Error: " + syncGeodatabaseError.message + " Code= " + syncGeodatabaseError.code.toString() + " " + syncGeodatabaseError.details;
}
}
GenerateGeodatabaseParameters {
id: generateGeodatabaseParameters
}
Rectangle {
id: textStatusRectangle
anchors {
fill: statusText
margins: -10 * scaleFactor
}
visible: statusText.text.length > 0
color: "lightgrey"
radius: 5
border.color: "black"
opacity: 0.77
}
Text {
id: statusText
anchors {
left: parent.left
right: parent.right
bottom: parent.bottom
margins: 20 * scaleFactor
}
wrapMode: Text.WordWrap
color: "black"
}
Rectangle {
anchors.fill: parent
color: "transparent"
border {
width: 0.5 * scaleFactor
color: "black"
}
}
Component.onCompleted: {
statusText.text = "Getting service info";
serviceInfoTask.fetchFeatureServiceInfo();
}
}
}
... View more
08-10-2016
11:04 AM
|
1
|
1
|
2167
|
|
POST
|
I believe that should work, as it takes a Geometry - ArcGIS Runtime SDK for Qt QML API: GenerateGeodatabaseParameters Class Reference
... View more
08-08-2016
08:51 AM
|
0
|
3
|
2167
|
|
POST
|
extent/geometry is a required parameter from the rest api, so you will need to provide it - Create Replica - Feature Service (Operation) - ArcGIS
... View more
08-05-2016
01:06 PM
|
1
|
5
|
2167
|
|
POST
|
Hi Taner, It works for me when I zoom to the US, and put 0-8 as my LOD. The sample is pretty bare bones, and doesn't do any validation to make sure the LODs make sense based on the extent/scale you are at. Try zooming to the US lower 48, and do 0-8, and see if that works. Thanks, Luke
... View more
08-04-2016
12:09 PM
|
0
|
0
|
1810
|
|
POST
|
Hi Brian, What type of security are you using? OAuth or Token based? If token based, then we have a sample in the QML Sample app under security > Token based security that shows how to make a connection to the identity manager singleton, and prompt a sign in dialog when there is a request for credentials. Let me know if you are using OAuth, and I will see if I can find an example for you. Thanks, Luke
... View more
08-03-2016
09:16 AM
|
0
|
0
|
1163
|
|
POST
|
Hi Mathan- Since this is using version 100 (Quartz), which is in beta, this post should be put in the early adopter community. We try and keep all of our beta related questions in the early adopter community, and questions for released software in geonet. Thanks! Luke
... View more
08-03-2016
09:13 AM
|
1
|
0
|
873
|
|
POST
|
You will need to go to developers.arcgis.com, sign in with your credentials, and create a new app. This will give you client id and secret to use. I did not upload them because you should treat the secret like it is a password. -Luke
... View more
08-02-2016
11:27 AM
|
1
|
2
|
1810
|
|
POST
|
Esri.Samples 1.0 is the namespace registered in the sample's main.cpp. If you aren't using anything from that, you can remove the import from the QML. If you are using something from this class, then make sure to add it into the main.cpp.
... View more
07-26-2016
08:54 AM
|
0
|
0
|
776
|
|
POST
|
Yea, I am not sure how you would go about manipulating the geometries like that, other than doing some math on your own. I'm not sure what that would entail. We are looking to add rotation renderers in the future, so features could be rotated by an attribute field in the associated table. In your case, I think you need to zoom to, then rotate map. You may need to manually add some padding around the envelope by buffering it. Then zoom to that, and it should be slightly zoomed out further. In our Quartz release (which is available in beta right now), you can zoom to a geometry, and set the padding in device independent pixels, so that should likely fix the issue of it zooming in too far.
... View more
07-25-2016
03:43 PM
|
1
|
0
|
1955
|
|
POST
|
So once you get the envelope back, you then want to zoom the map to that envelope, but you also want to rotate the map's extent by some degree?
... View more
07-25-2016
10:44 AM
|
0
|
2
|
1955
|
|
POST
|
Are you saying you just want to render it on the screen with a rotation? Or do you actually want to rotate the entire geometry and update the geometry of the feature?
... View more
07-25-2016
09:20 AM
|
0
|
4
|
1955
|
|
POST
|
AppStudio exposes the SDK's 10.2.6 release, so any generic ArcGIS Runtime code you have written, whether using AppStudio or with the SDK should be moveable between the 2 environments. For example, some function that does a bunch of editing or geometry operations should work between the two environments without any issues.
... View more
07-25-2016
09:18 AM
|
1
|
0
|
924
|
|
POST
|
It all depends on how you install Qt Creator. If you install with the online installer from Qt, they usually consolidate it all into just one Qt Creator install. But in the case that you do end up with 3 Qt Creators, you can go to the Qt Creator settings/options, then build and run, then the Qt Versions tab. Once there, click the add button, and browse to all of the qmake executables you will be using. Click apply, and it should show up in your available kits for that Qt Creator.
... View more
07-19-2016
04:25 PM
|
2
|
1
|
2680
|
|
POST
|
Did you select Qt Creator when you ran the post installer? You will need to select Qt Creator to configure the templates, help, etc. The post installer will copy the template folders from the ideintegration folder of the sdk setup into %appdata%/QtProject/qtcreator/templates/wizards. So, worst case as a workaround, you could copy the folders there manually and reopen Qt Creator. However, as long as you have run the post installer for Qt Creator, it should work. - Luke
... View more
07-19-2016
04:14 PM
|
2
|
3
|
2680
|
| 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 |
06-17-2026
07:54 AM
|