Property OnlineLayers
OnlineLayers
Gets a mutable list of layers that will not be taken offline and will continue to reference online services.
Declaration
public IList<Layer> OnlineLayers { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IList<Layer> | A mutable list of layers that will not be taken offline and will continue to reference online services. |
Remarks
In some situations, you may wish to prevent a layer from being taken offline even though it is supported. For example, by continuing to reference the live online service for a FeatureLayer, you can benefit from the most up-to-date information. You can choose to keep layers from the map's operational layers or basemap layers collections online.
To make the offline map continue to reference an online layer add it to the OnlineLayers collection. By adding a Layer to this list, you indicate that the layer will not be taken offline but will instead continue to reference the online service. Be aware that the resulting offline map will require a network connection and may also require authentication.
Note that if a Layer is included in this collection it will not be taken offline - you should update the relevant parameters to remove the details pertaining to that layer:
- ExportTileCacheParameters can be removed to prevent an ArcGISTiledLayer from being taken offline.
- ExportVectorTilesParameters can be removed to prevent an ArcGISVectorTiledLayer from being taken offline.
- GenerateGeodatabaseParameters can be removed for an entire feature service or updated to remove an individual FeatureLayer using LayerOptions.
If a feature service contains many tables in the web map, you can choose to keep specific layers online by adding them to the OnlineLayers collection and updating the GenerateGeodatabaseParameters to remove the specific layers. Any remaining feature layers or stand-alone tables that you wish to take offline can be configured using the LayerOptions for the service in GenerateGeodatabaseParameters.
When you create a GenerateOfflineMapParameterOverrides object, this collection will be populated according to the OnlineOnlyServicesOption setting in the original parameters.
- If you set OnlineOnlyServicesOption to Exclude then this collection will be empty.
- If you set OnlineOnlyServicesOption to Include then this collection will contain each online-only Layer in the web map (e.g. those which cannot be taken offline).
- If you set OnlineOnlyServicesOption to UseAuthoredSettings then this collection will contain each Layer that the web map author selected to remain online.
Applies to
Platforms and versions
Target | Versions |
---|---|
.NET Standard 2.0 | 100.10 - 200.5 |
.NET | 100.13 - 200.5 |
.NET Windows | 100.13 - 200.5 |
.NET Android | 200.0 - 200.5 |
.NET iOS | 200.0 - 200.5 |
.NET Framework | 100.10 - 200.5 |
Xamarin.Android | 100.10 - 100.15 |
Xamarin.iOS | 100.10 - 100.15 |
UWP | 100.10 - 200.5 |