ArcGIS Mobile SDK - using SelectFeatureTypePage

1844
1
Jump to solution
12-20-2016 09:22 AM
JohnFannon
Occasional Contributor II

Hi

I'm trying to create a custom collection workflow for the ArcGIS Mobile for Windows application (10.2.1) which I know is out of support soon, but hoping someone might have come across this.

In the workflow I want to use the standard SelectFeatureTypePage to allow the user to select a feature type to collect. However, when I create a new instance of the SelectFeatureTypePage and transition to it, there are no feature types listed, despite there being layers in the project with AllowNew = true.

I can see that the SelectFeatureTypePage has a FeatureTypeListControl property which has a FeatureSourceInfos property, but this is read-only, so I can't populate it with layer sources. 

The code I have is: 

SelectFeatureTypePage selectFeatureTypePage = new SelectFeatureTypePage();
selectFeatureTypePage.Title = "Collect";
selectFeatureTypePage.Note = "Select the type of feature";
selectFeatureTypePage.ImageSource = this.ImageSource;
selectFeatureTypePage.ShowFeatureSources = true;

selectFeatureTypePage.ClickBack += new EventHandler(OnSelectFeatureTypeBackCommandExecute);
selectFeatureTypePage.FeatureTypeSelected += new EventHandler<FeatureTypeEventArgs>(OnFeatureTypeSelection);

MobileApplication.Current.Transition(selectFeatureTypePage);

The constructors for SelectFeatureTypePage and FeatureTypeListControl also do not have arguments to pass in a set of layer infos. 

Has anyone successfully used the SelectFeatureTypePage in the ArcGIS Mobile SDK? How did you get it to populate the list of feature types?

Any help greatly appreciated.

Regards

John

0 Kudos
1 Solution

Accepted Solutions
JohnFannon
Occasional Contributor II

After several weeks wait, I now have confirmation from Esri UK, via Esri Inc, that this is a bug as it's not possible to populate the SelectFeatureTypesPage using the SDK. 

The reference I was give - if it's of use to anyone else was: 

BUG-000102430 : Unable to populate SelectFeatureTypePage using the ArcGIS Runtime for Windows Mobile

An Esri UKs conclusion was:

The FeatureTypeListControl is what is used to populate the SelectFeatureTypePage.  The FeatureTypeListControl is populated by FeatureSourceInfos.  FeatureSourceInfos is a read only property, which means the FeatureTypeListControl cannot be populated.  This in turn means the SelectFeatureTypePage cannot be populated.

As the product is now in mature support and shortly to be retired, Esri Inc will not provide a fix. In any case, due to our time constraints, we had already worked around the issue by creating a custom SelectFeatureTypesPage that allows for population of the feature type list with a collection of FeatureSourceInfos. We made this visually the same as the original and it works very well, although took several hours of development that we hadn't budgeted for.

I hope that helps anyone else who might be struggling with the same issue.

Regards

John

View solution in original post

1 Reply
JohnFannon
Occasional Contributor II

After several weeks wait, I now have confirmation from Esri UK, via Esri Inc, that this is a bug as it's not possible to populate the SelectFeatureTypesPage using the SDK. 

The reference I was give - if it's of use to anyone else was: 

BUG-000102430 : Unable to populate SelectFeatureTypePage using the ArcGIS Runtime for Windows Mobile

An Esri UKs conclusion was:

The FeatureTypeListControl is what is used to populate the SelectFeatureTypePage.  The FeatureTypeListControl is populated by FeatureSourceInfos.  FeatureSourceInfos is a read only property, which means the FeatureTypeListControl cannot be populated.  This in turn means the SelectFeatureTypePage cannot be populated.

As the product is now in mature support and shortly to be retired, Esri Inc will not provide a fix. In any case, due to our time constraints, we had already worked around the issue by creating a custom SelectFeatureTypesPage that allows for population of the feature type list with a collection of FeatureSourceInfos. We made this visually the same as the original and it works very well, although took several hours of development that we hadn't budgeted for.

I hope that helps anyone else who might be struggling with the same issue.

Regards

John