Select to view content in your preferred language

Exposing Feature Class from (file) GDB into WPF app as Feature Layer

5379
17
12-22-2011 08:08 AM
BKuiper
Frequent Contributor
Hello,

what would be the best way to expose a feature class which is stored in a (file) geodatabase in a WPF ESRI Map Control as a Feature Layer using ArcGIS Runtime.

Currently we are using a empty map file (.mxd), add a reference to the feature class and save it as a new map file (.mxd), convert the .mxd to a map package with runtime support (.mpk) and then consume it as a LocalArcGISFeatureLayer.

Would you agree that this is the best and preferred ESRI way ?
0 Kudos
17 Replies
MichaelBranscomb
Esri Frequent Contributor
Hi,

Apologies for the earlier misdirection. Unfortunately the dynamic layers capability does not work with feature services or feature layers. The capability is currently supported only by map services and therefore by the dynamic map service layers. When the contents of a map service are altered via the dynamic layers capability no changes are applied to the underlying service and therefore no changes will appear in the REST end point for that service. We'll need to do some more research on the legend control issue.

Regarding the Dev Summit - several of the ArcGIS Runtime team (including me) will be there presenting tech sessions and demo theatres and manning the showcase - look forward to seeing you there!

Cheers

Mike
0 Kudos
BKuiper
Frequent Contributor
So rephrasing and coming back to my original question

I have multiple features classes in a file geodatabase.

- What is the best way to display these on the Map control ?
- What is the best way to display these features classes as Feature Layers, so they can be editied, on the Map control.

1) Use a LocalMapService with a DynamicWorkspace to display them. This means i will need an empty or initial mpk that can be consumed by the LocalMapService.

2) Create a mxd that adds references to the Feature classes in the file gdb, convert mxd to mpk and and consume it as LocalFeatureLayer.
    NOTE: currently LocalFeatureService doesn't support DynamicWorkspace to edit data.

is this correct?

Thank you!

EDIT:

I added an image to explain what i'm currently doing to load Feature classes from the GDB into the application (and enable editing if necessary).

So my goal:
To display and, if needed, edit feature classes from a File geodatabase within the WPF app.

The image shows my current implementation: Create MXD, add feature class reference, save, convert to MPK and Load and display layer.

I would like an implementation where you can let the ArcGIS runtime point directly to the File geodatabase without using an MPK and enables you to edit data.

Currently the DynamicLayers option comes close, but it needs an MPK and doesn't support editing yet.

Can you comment on this? Thank you!
0 Kudos
BKuiper
Frequent Contributor
Please see my updated comment. (above this post).
0 Kudos
BKuiper
Frequent Contributor
Mike, could you respond on this? Is this the correct workflow and will this improved in the future? In the old win-forms, ArcObjects world you could directly add local shapefiles and feature classes.

I understand that the current setup with ArcGIS Runtime changes how everything how works, but a similar approach should be achievable. Make it so that the developer can add a local layer with one function call, which will let ArcGIS Runtime automatically expose it.

Looking forward to your insights and thoughts on this,

Thanks for your time and effort!
0 Kudos
MichaelBranscomb
Esri Frequent Contributor
Hi,

Apologies for the delay - I've been doing some research on both approaches and I'm still waiting for some more information.

Cheers

Mike
0 Kudos
BKuiper
Frequent Contributor
Thanks! Looking forward to your response.
0 Kudos
MichaelBranscomb
Esri Frequent Contributor
Hi,

Unfortunately in the first release there will not be an API for the adhoc adding of Feature Classes from a Geodatabase to the map in order to edit those Feature Classes. If no editing is required then the Dynamic Layers capability can be used to achieve this via LocalMapServices. After the first release one of the highest priorities is to work on the type of adhoc editing functionality you are asking for in addition to a richer editing synchronization framework. 


Cheers

Mike
0 Kudos
BKuiper
Frequent Contributor
Thanks for the update. Looking forward on talking with you at the DevSummit about these topics.
0 Kudos