AuGeo (Template)

363
3
Jump to solution
11-14-2018 11:40 PM
YukiOZAWA
New Contributor III

Hi,
I am using AuGeo (Template) provided for AppStudio for ArcGIS Desktop.
I am not changing the source code by Qt Creator, but I will fail to query the feature of feature service when tap the "Refresh Data" button on the map screen.
Looking at the console of AppStudio, the extent of the geometry used for the query is non.
It seems that the extent of the map is not get correctly, where should it be fixed?

0 Kudos
1 Solution

Accepted Solutions
YukiOZAWA
New Contributor III

Hi,

It seems that visibleRegion of map has not been acquired.
The following Qt bug may be involved.
https://bugreports.qt.io/browse/QTBUG-56071

I was able to work around this problem by modifying the code on the MapPage.qml.

current:

var extent = QtPositioning.shapeToRectangle(map.visibleRegion);

workaround:

var xmin = map.toCoordinate(Qt.point(0, 0)).longitude;
var ymin = map.toCoordinate(Qt.point(map.width, map.height)).latitude;
var xmax = map.toCoordinate(Qt.point(map.width, map.height)).longitude;
var ymax = map.toCoordinate(Qt.point(0, 0)).latitude;
var extent = QtPositioning.rectangle(QtPositioning.coordinate(ymax, xmin), QtPositioning.coordinate(ymin, xmax));

View solution in original post

0 Kudos
3 Replies
ErwinSoekianto
Esri Regular Contributor

Yuki, 

From the screenshots you provided, it looks like you are trying to load the Starbuck data that we pre-configured in AppStudio Player. Since you are not changing the source code, is this same issue also happening on the released app that you can download from the Apple AppStore or Google Play Store?

Is this only happening on some or specific devices? 

Thank you,

Erwin.

0 Kudos
YukiOZAWA
New Contributor III

Hi Erwin,

This will not be reproduced with the application downloaded from the AppStore and Google Play.
It seems to occur when AppStudio for ArcGIS Desktop is used.
Problems are reproduced on multiple devices of iOS and Andorid.
I can also reproduce the problem by creating .ipa and .apk using AppStudio for ArcGIS Desktop.

Best,
Yuki

0 Kudos
YukiOZAWA
New Contributor III

Hi,

It seems that visibleRegion of map has not been acquired.
The following Qt bug may be involved.
https://bugreports.qt.io/browse/QTBUG-56071

I was able to work around this problem by modifying the code on the MapPage.qml.

current:

var extent = QtPositioning.shapeToRectangle(map.visibleRegion);

workaround:

var xmin = map.toCoordinate(Qt.point(0, 0)).longitude;
var ymin = map.toCoordinate(Qt.point(map.width, map.height)).latitude;
var xmax = map.toCoordinate(Qt.point(map.width, map.height)).longitude;
var ymax = map.toCoordinate(Qt.point(0, 0)).latitude;
var extent = QtPositioning.rectangle(QtPositioning.coordinate(ymax, xmin), QtPositioning.coordinate(ymin, xmax));

View solution in original post

0 Kudos