Hi,
I am using OnMapSelectionChangedEvent() to trap when a user clicks in the TOC.
How can I get the FileGDB (or SHP, or Raster image etc) name from the clicked Map item?
Yes, I have to filter out Group names etc from the Selected Layers.
Thanks in advance,
Zoltan
Within a QueuedTask, you can get the data connection from the feature layer, then look at its workspace connection string. It'll have a value like "DATABASE=path_to_database.gdb" or "DATABASE=path_to_folder" in the case of a file system raster.
await QueuedTask.Run(() =>
{
var layerConnection = featureLayer.GetDataConnection() as CIMStandardDataConnection;
var workspaceConnectionString = layerConnection.WorkspaceConnectionString;
});
Hi Stephen,
Megathanks - I'll give this a try tomorrow.
Regards,
Zoltan