Select to view content in your preferred language

.lyr support in Runtime/MAPS SDK

659
3
09-25-2023 07:59 AM
OmairJamil
Emerging Contributor

We were using ArcGIS engine to display .lyr layer files in our application. Now in Runtime/Maps there is no direct support for .lyr files. It is mentioned in https://proceedings.esri.com/library/userconf/devsummit18/papers/dev-int-074.pdf that Maps SDK local server has support for .lyr files. But it looks like, with Local server, we have to create a gpkx of each lyr file separately  in order to display it in our application.

Is there a direct way where we can open the .lyr file(our customers have 100s of .lyr files) and display it in our application using any new API(since ArcGIS engine is retiring)?

What are my options to use old .lyr files in our application using new API?

3 Replies
OleNowak
Occasional Contributor

We are looking for a solution, too.

There are thousands of lyr Files out there and there is no migration rule.

Instead there are several different formats for layer properties:

- ArGIS Pro uses lyrx Files

- FeatureServices use a JSON Format

- Maps SDK uses no explicit format, but you can serialize FeatureLayer toJSON. In this case not all properties will be serialized, so you need to write your own Serializer with own classes.

 

And, of course, these 3 formats are not compatible to each other... That's a mess. Why? It is one platform, so why are there tons different solutions for the same aspects. Frustrating!

MichaelBranscomb
Esri Frequent Contributor

Hi,

There are possibly several options and considerations for you depending on your ongoing data management strategy:

  • Did you create the .ly files with ArcMap originally?
  • Do you plan to use ArcGIS Pro to create .lyrx files in future?
  • Did you frequently create .lyr files for the ArcGIS Engine based app or was it a one time process when initially setting up / deploying your app in production?
  • Does your ArcGIS Engine application save/share/export any .lyr files for use by other users of your app or other Esri products (e.g. ArcMap)?
  • What platform/framework are you using - WPF? WinUI? .NET MAUI?

Essentially, I'm trying to determine if this is a one-time conversion of all your existing .lyr files into an appropriate format for use with the Native Maps SDKs or if this is an ongoing process and you need to continue to support users regularly sharing and opening layer files in your app.

 

Thanks

0 Kudos
OmairJamil
Emerging Contributor

Hi Michael,

Please find the answers below.

  • Did you create the .ly files with ArcMap originally?

We create the .lyr file using ArcGIS Engine. Also we do have a workflow in our software where we can import .lyr file generated from ArcMap.

  • Do you plan to use ArcGIS Pro to create .lyrx files in future?

Our plan was to create .lyrx files using MAPS SDK. We do want to import .lyrx files generated from ArcGIS Pro.

  • Did you frequently create .lyr files for the ArcGIS Engine based app or was it a one time process when initially setting up / deploying your app in production?

In our software creating a .lyr file is a frequent task. Customers routinely create new layers saved as .lyr file. It is like adding a layer in ArcMap and saving it as lyr file.

  • Does your ArcGIS Engine application save/share/export any .lyr files for use by other users of your app or other Esri products (e.g. ArcMap)?

We do have a workflow to publish the layer to ArcGIS online/portal. Also customers use the lyr files generated by our software and use it in ArcMap.

  • What platform/framework are you using - WPF? WinUI? .NET MAUI?

We are using WPF.

Please do let me know if you need anything further.

0 Kudos