Select to view content in your preferred language

How to display .lyr file?

1398
6
04-15-2022 01:46 AM
hesapadam
New Contributor III

I have a .lyr file which contains many references to raster (.ecw) files. According to the answer here https://community.esri.com/t5/arcgis-runtime-sdk-for-net-questions/loading-layer-files/m-p/622897/hi... it is possible to display .lyr file by using Local Server Component. However I could not find out how. Any help is appreciated.

0 Kudos
6 Replies
hesapadam
New Contributor III

@MichaelBranscomb any suggestions?

0 Kudos
MichaelBranscomb
Esri Frequent Contributor

What layer type or data format does your .lyr file apply to?

0 Kudos
hesapadam
New Contributor III

I'm not sure if this is what you meant, but my .lyr file contains the name of a .ecw file. 

0 Kudos
MichaelBranscomb
Esri Frequent Contributor

ArcGIS Runtime doesn't support .lyr/.lyrx files directly but there are several options depending on what you would like to achieve:

OmairJamil
New Contributor II

We were using ArcGIS engine to display .lyr layer files in our application. Now in Runtime/Maps there is no support. IT looks like, with Local server, we have to create a gpkx of each lyr file in order to display it in our application.

Is there a way where we read the .lyr file(we have 100s of .lyr files) and display it our application using the new API? what is the supported mechanism for this feature?

0 Kudos
hesapadam
New Contributor III

Actually, my .lyr files contain both file geodatabase raster catalogs and feature classes. I have been using ArcGIS Engine and it is quite simple to use .lyr files. By using ArcMap, I was able to add symbology or set scale range to feature classes in the .lyr file. And it was possible to load .lyr files with ArcGIS Engine.

However, I couldn't do that in ArcGIS Runtime. Are there any ways to add feature classes with these features outside from the code in ArcGIS Runtime (symbology, scale ranges, etc.)? 

0 Kudos