I change the map to map view and all the related classes. It still doesn't work with the 100.1 environment in appstudio player. Do I need to recreate my apps from the scratch?
Solved! Go to Solution.
So finally detected the problem. It was not related to the appstudio player but to spatialreference assignment.
Also, to those who might face this problem in
Appstudio Player >> Settings >> Diagnostics >> Enable Logging
This helped me track down my problem. Because the issue came on when the app run in appstudio player but it was working fine when it ran from the studio.
Please post this question in the AppStudio space. If you have migrated all of the classes, then it sounds like there is something that needs to change in AppStudio - https://community.esri.com/groups/appstudio
You mentioned you changed the Map to MapView. Did you also add the map property to MapView? Your code should something like
MapView{
id:mapView
anchors.fill:parent
Map{
BasemapImagery{}
ArcGISMapImageLayer{
id:mapServiceLayer
url:"http://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer"
onLoadStatusChanged: {
if(loadStatus === Enums.LoadStatusLoaded){
mapView.setViewpointGeometry(mapServiceLayer.fullExtent);
}
}
}
FeatureLayer{
id:citiesLayer
visible: false
featureTable:citiesFeatureTable
}
ServiceFeatureTable{
id: citiesFeatureTable
url: "http://sampleserver6.arcgisonline.com/arcgis/rest/services/Wildfire/MapServer/0"
}
}
}
Please see AppStudio sample "Basic Map Settings" for more information. Also checkout this video to help you get started
Chapter 6.2 ArcGIS Runtime 100.x | How to Get Started with ArcGIS Runtime 100.x (2 of 6) - YouTube
If it still doesn't help provide your code, screenshots or errors. You can also go ahead and log a Esri support ticket and they will be able to help you troubleshoot the issue.
Thanks,
Nakul
One more thing I forgot to add that AppStudio Player 2.x supports both 10.2.6 and 100.1 Runtime. But in order for it work correctly. Please choose the correct Runtime version in the Player settings. Once you select it. It will ask you to restart the player.
Nakul,
Yes, I added the map property. The code looks similar to yours. So after more exploring, the problem is that when I compile from Qt Creator or run the app from appstudio it works fine. But when I run the same application from appstudio player the map goes blank (there is no map - nothing). I thought appstudio player had issues so I used a different system but the problem is still there.
What version of Player are you using? It has to be 2.0.26, otherwise it won't work. Have you confirmed the Runtime settings?
If the settings is correct. Then also please close the Player app on your device and then then restart the Player. Then try your app. If the problem persists please log a support issue so we can track it on our end.
Thanks,
Nakul
Yup, did all of that. Version 2.0.26 and the runtime is 100.1.
So finally detected the problem. It was not related to the appstudio player but to spatialreference assignment.
Also, to those who might face this problem in
Appstudio Player >> Settings >> Diagnostics >> Enable Logging
This helped me track down my problem. Because the issue came on when the app run in appstudio player but it was working fine when it ran from the studio.