I am not so experience with programming, I built a custom app with appstudio for arcgis 1.0 and on the process of the upgrade to appstudio for arcgis 4.2 some modules and classes have changed. I not that familiar with all the changes. Now I am getting a error message "the arcgis type location display is not creatable"
here is part of the code where i get the error message.
onLoadStatusChanged: {
if (loadStatus === Enums.LoadStatusLoaded) {
mapView.locationDisplay.autoPanMode = Enums.LocationDisplayAutoPanModeRecenter;
mapView.locationDisplay.start();
}
}
// onLoadStatusChanged: {
// if (status === Enums.MapStatusReady) {
// positionSource.active = true;
// }
// }
//CREATE USER POSITION DISPLAY modified 042120
LocationDisplay {
id: locationDisplay
positionSource: PositionSource {
id: positionSource
}
}
Solved! Go to Solution.
Raul,
Upgrading from AppStudio 1.0 to AppStudio 4.2 is a huge jump, there are a lot of libraries that might be deprecated already. This error specifically is I think related to the different version of ArcGIS Runtime SDK for Qt from 10.2.x to 100.7.
These are the documentation related to the Map View and Location Display object on the latest ArcGIS Runtime SDK for Qt,
- Sample, Display device location | ArcGIS for Developers
- LocationDisplay Object, LocationDisplay QML Type | ArcGIS for Developers
This statement from the LocationDisplay doc might help you,
Each MapView has its own instance of LocationDisplay. This means that you don't have to explicitly instantiate LocationDisplay, but rather, a newly created MapView already has a LocationDisplay that should be used.
I hope this is helpful,
Erwin.
Raul,
Upgrading from AppStudio 1.0 to AppStudio 4.2 is a huge jump, there are a lot of libraries that might be deprecated already. This error specifically is I think related to the different version of ArcGIS Runtime SDK for Qt from 10.2.x to 100.7.
These are the documentation related to the Map View and Location Display object on the latest ArcGIS Runtime SDK for Qt,
- Sample, Display device location | ArcGIS for Developers
- LocationDisplay Object, LocationDisplay QML Type | ArcGIS for Developers
This statement from the LocationDisplay doc might help you,
Each MapView has its own instance of LocationDisplay. This means that you don't have to explicitly instantiate LocationDisplay, but rather, a newly created MapView already has a LocationDisplay that should be used.
I hope this is helpful,
Erwin.
Hi Erwin,
Thank you so much for the explanation, this really worked.
Hi Erwin,
I am not able to capture data and getting this error message. Need help
MyApp.qml:243: ReferenceError: positionDisplay is not defined
Raul,
I think positionDisplay was available in ArcGIS Runtime version 10.2 Position display—ArcGIS Runtime SDK for Qt | ArcGIS for Developers , but no longer in version 100.x , Migrate to 100.x from 10.2.x—ArcGIS Runtime SDK for Qt | ArcGIS for Developers
You should remove or replace it with the library that is available in version 100.x
Thank you,
Erwin
Hi Erwin,
Here again, I was able to build application with some referenceErrors.
On executing the Mobile App
First one - userCredText is not defined
Second - Unable to assign [undefined] to int
On performing field collection I get this
Cannot read property 'x' of undefined
Your assistance will be greatly appreciated.