I have to migrate an application from 10.2.6 to 100.1.

697
7
Jump to solution
09-09-2017 11:30 AM
AneeqaAbrar1
New Contributor III

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? 

0 Kudos
1 Solution

Accepted Solutions
AneeqaAbrar1
New Contributor III

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.

View solution in original post

0 Kudos
7 Replies
LucasDanzinger
Esri Frequent Contributor

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 

0 Kudos
nakulmanocha
Esri Regular Contributor

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

0 Kudos
nakulmanocha
Esri Regular Contributor

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.

0 Kudos
AneeqaAbrar1
New Contributor III

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. 

0 Kudos
nakulmanocha
Esri Regular Contributor

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

0 Kudos
AneeqaAbrar1
New Contributor III

Yup, did all of that. Version 2.0.26 and the runtime is 100.1. 

0 Kudos
AneeqaAbrar1
New Contributor III

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.

0 Kudos