Saving a layer file
A layer can exist outside your map as a layer file (.lyr). This makes it easy for others to access the layers you've built.
You can share layers over the network and by e-mail.
When users add a layer file to their maps, it will draw exactly as it was saved as long as they can get access to the data referenced by the layer. A common way that users help support this is to use relative paths to each layer's data source.
When you save a layer file using either the Standard or Maplex Label Engine, that information will be stored in the layer file. If you add a layer file saved with the Maplex Label Engine to a .mxd using the Standard Label Engine, the Label Engine Warning dialog box will appear and you will decide whether to upgrade the data frame to the Maplex Label Engine.
Using full paths, relative paths, or UNC paths in the layer's data reference
The layer file that is created will reference its data source using the Data Source Options setting that are specified for the map document. By default, this setting specifies that data sources will be referenced with their full paths. However, you can also use other conventions to record paths. See Referencing data in the map for more information.
Set this property before you save your layer.
Saving a layer to a previous version of ArcGIS
You can save a layer and work with it in a previous version of ArcGIS. For example, you can save to ArcGIS 9.3.
When saving a layer to a previous version, keep in mind that older versions of ArcGIS may be unable to access newer data sources in the current release. For example, a layer that points to an ArcGIS 10.3.1 geodatabase will not work in earlier versions of ArcGIS.
Steps for saving a map layer
- Right-click the layer name and click Save as Layer File.
- Type in the name of your new layer file.
- Optionally, you can choose to save a layer to a previous version of ArcMap using Save as type.
- Click Save.
Saving a layer package
A layer can be saved with its data as a layer package (.lpk). A layer package includes both the layer properties and the dataset referenced by the layer. With a layer package, you can save and share everything about the layer—its symbolization, labeling, field properties, and the data.
Other users will be able to add layer packages directly into their maps without having to know how to access the database or classify the data. Layer packages can be created in ArcMap, ArcGlobe, and ArcScene and can be shared between these applications, including ArcGIS Explorer. When using ArcGlobe or ArcScene, 3D properties can be added to a map layer and included in a layer package.
While a layer package will be larger in size than a layer file (because it includes the data), your users will not need to worry about access to your same data sources.
Packaging unsupported layers and datasets for previous versions will result in those items not opening when used by previous versions of the software. You will receive a warning for content that will not be available in previous versions of ArcGIS when packaging your layer. Layer packages support multiple versions of ArcGIS; therefore, consider the layers and data sources you are choosing to package to ensure they are available in previous versions of the software.
Additionally, a layer can be saved as a schema-only layer package. This type of package allows you to share your layer design and the corresponding data model design without sharing your data. When you unpack a schema-only layer package you will be prompted to create a new geodatabase or pick an existing one, and the data model for the layers will be loaded into that geodatabase. You can then load your own datasets for the layers in that geodatabase.
Steps for saving a data layer package
- Right-click the layer and select Create Layer Package. The Layer Package dialog box will appear.
- Specify where to save your layer package and give it a name—either as a file on disk or in your ArcGIS Online account for sharing.
- You can choose to include data from an enterprise (ArcSDE) geodatabase (Include Enterprise Geodatabase data instead of referencing the data).
- Under Item Description, provide a Summary and Tags for your layer package.
- Specify Additional Files you want to include in the layer package. This option allows you to include other content, such as detailed documentation, reports, graphs, and so on. The following types of files are not allowed to be included in the package: .js, .vbs, .py, .pyc, .pyo, .bat, and .ocx. Also, only signed .dlls and .exes are allowed to be included.
- You must Analyze your layer before you can save it to disk or share it at ArcGIS Online. When you run Analyze, it will validate your layer for any errors or warnings. If any issues are discovered, a Prepare window will appear with a list of the errors and warnings.
Right-click each Prepare message to get more information, read help for the error, and click suggested fixes.
- Click Share to create your layer package.
Steps for saving a schema-only layer package
The steps for creating a schema-only layer package are the same as the steps outlined above for saving a layer data package except that in step 3, you choose Package schema only option to create a schema-only layer package.
Steps for packaging 3D map layer properties
Enabling 3D properties for a layer package will be important for using that layer package effectively between the different 3D visualization environments (ArcGlobe, ArcScene, and ArcGIS Explorer). The properties must be set first, then saved to a local layer file.
For more information on using layers and layer packages in ArcGIS Explorer, see Working with ArcGIS layers and layer packages.
- Start ArcGlobe or ArcScene and add the map layer (or layer package) that you created in ArcMap.
- Set the desired 3D properties. For example, setting the height properties to extrude features in 3D, setting the distance range for a map layer's visibility in 3D, and so on.
- Right-click the layer in ArcGlobe or ArcScene and choose Create Layer Package.
- Follow the steps outlined above to complete the creation of a layer package.