I'm using a REST MapServer which provides a layer of parcel (property line) data on my map, all under Qt.
I need to parse the parcel boundaries into a list of vertices (for rending in an Augmented Reality view) and am using IdentifyTask to get the data. I get the top-level information ok, but then find a QMLPolygon and am unable to figure out how to parse the data out it.
This is the key code:
IdentifyTask {
id: identifyTask
url: serviceLayerUrl
onIdentifyTaskStatusChanged: {
if (identifyTaskStatus === Enums.IdentifyTaskStatusCompleted) {
for (var index in identifyResult) {
var result = identifyResult[index];
console.log("Name, Value:", result.layerName, result.value.toString());
console.log("Geometry:", result.feature.geometry);
}
} else if (identifyTaskStatus === Enums.IdentifyTaskStatusErrored) {
resultText.text = identifyError.message;
}
}
}
This is the output:
qml: Name, Value: ME_Acton_Cape_Polygons_Merge U13-57
qml: Geometry: QmlPolygon(0x7ffc69fc1e80)
I'm not finding any documentation on QmlPolygon. From related projects written in Objective-C and Java (iPhone and Android) I know there's a PointCount followed by a list of vertices. Any suggestions on how to access them?
Apologies in advance if this is a simple question, REST service use within ArcGIS is new to me.
Thanks! Chuck
Figured it out (that's what happens when you post a question!)
Using properties from ArcGIS Runtime SDK for Qt (QML API): MultiPath solved it, for example
console.log("Points:", result.feature.geometry.pointCount.toString());
yields
qml: Points: 6