we use Arc Pro to export a group layer into a LYRX file. This layer file indicates a FileGDB in the dataConnection
"dataConnection" : {
"type" : "CIMStandardDataConnection",
"workspaceConnectionString" : "DATABASE=C:\\Users\\Jun.Guan\\OneDrive - Bentley Systems, Inc\\Documents\\ArcGIS\\Packages\\KEk_GIS_20230414a_ajs_for_Geosoft_1ff973\\p20\\ek_map_20220622_ajs.gdb",
"workspaceFactory" : "FileGDB",
"dataset" : "DescriptionOfMapUnits",
"datasetType" : "esriDTTable"
},
We try to load this FileGDB based on the sample in this post: https://community.esri.com/t5/net-maps-sdk-questions/have-to-add-feature-classes-from-file-geodataba.... But we found the sample in the post is for v100.7, and it does not exist in the current version (>100.15). We try:
1. add the sample (DynamicWorkspaceShapefile) into the current version, and get the following error when loading the sample shapefile
---------------------------
Error
---------------------------
Esri.ArcGISRuntime.Http.ArcGISWebException: Failed to create service mpk_blank MapServer. Wrong package type used to start service
at Esri.ArcGISRuntime.Http.HttpDispatcher.SendAsync(HttpRequestMessage request, HandlerOptions options, CancellationToken cancellationToken)
at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
at Esri.ArcGISRuntime.LocalServices.LocalService.StartServiceInternal(IDictionary`2 serviceSpecificParams, CancellationToken cancellationToken)
at ArcGISRuntime.WPF.Samples.DynamicWorkspaceShapefile.DynamicWorkspaceShapefile.StartLocalMapService(String filename, String path) in D:\others\arcgis-maps-sdk-dotnet-samples\src\WPF\WPF.Viewer\Samples\LocalServer\DynamicWorkspaceShapefile\DynamicWorkspaceShapefile.xaml.cs:line 107
---------------------------
OK
---------------------------
2) Update the "Local Server Image Map Layer" sample to load the FileGDB as the following
Get the following error at line 106
My question is: Is Map SDK able to load a FileGDB (exported from Arc Pro)? if it is, would you please provide a sample code for this issue?
Thanks