With the Layer Presets component, you can create tailored views of your map data to highlight information of interest for your user. An advantage of configuring a layer preset is that you need to customize and maintain only one app that has many layers, instead of creating a new web app.
Examples of what you can configure in a layer preset are as follows:
•Apply a new basemap to put the most effective background behind the data you want to emphasize.
•Show/hide layers in the layer list to direct your user's focus on the relevant layers.
•Change the transparency of certain layers so specific data is still visible while the key data is more prominent.
•Change the scale visibility of certain layers to control what data your user can see at specific zoom levels.
You can also import a layer preset from Portal, making it easier to migrate complex configurations without manually rebuilding them.
The procedure below shows you how to create a layer preset. As our example, we create a layer preset called "Water Network". When the user selects this preset, all fire hydrants and water lines appear on the map and remain visible regardless of how far out the user zooms.
When you create a layer preset, you may want to also create a default preset that resets the view back to its original state.
To create a layer preset:
1.Open the Layer Presets settings and click Add Layer Preset.
The Layer Preset window opens.
2.Enter a Title for the preset and click Submit. In our example, we name our preset "Water Networks".
The settings open for the new layer preset.
3.In the Layer Extensions section, toggle the layers you want to show/hide by clicking the eye icon (). In our example, we want to make the Fire Hydrants and Water Lines layers visible and hide the Buildings and Neighbourhoods layers.
To apply a visibility setting to multiple layers at the same time, click Bulk Edit.
4.Select each visible layer extension and configure the settings described in the table below.
Field |
Description |
---|---|
Visible |
Determines whether this layer is visible on the map. |
Use Existing Transparency |
When enabled, the layer's current transparency remains unchanged (on). When disabled, you can manually adjust the transparency percentage to blend layers (100 is fully transparent and 0 is fully opaque). |
Use Existing Scale Range |
When enabled, the layer's current scale range remains unchanged (on). When disabled, you can manually adjust the following: •Maximum Scale: The scale at which your user cannot zoom in further. Setting this value to 0 allows your user to over-zoom layer tiles. •Minimum Scale: The scale at which your user cannot zoom out further. Setting this value to 0 allows your user to zoom out as far as possible. |
Included in Layer List |
Determines whether this layer appears in the Layer List. This does not affect the visibility of this layer on the map. |
Apply Definition Expression |
When enabled, you can enter a definition expression to apply specific filter conditions to the preset layer. |
Definition Expression |
This field only appears if Apply Definition Expression is enabled. Enter your query definition (for our example, STATUS='Active' to show only the active fire hydrants and water lines). You can use the Filter Builder or Query Builder to build the definition. Switch it to Advanced Mode, copy the SQL syntax, and paste it into the Layer Preset's Definition Expression field. |
In our example, we configure the Fire Hydrants and Water Lines layer extension settings as follows:
5.Click the back button ()to return to the settings for the layer preset.
6.Select a Basemap that emphasizes your data. For our example, we use Dark Gray Canvas.
7.Save your app.
When your user selects the configured layer preset, Web automatically applies the settings to the current layer.
The figure below shows the before and after of our Water Networks layer preset.
Layer presets must be created in VertiGIS Studio Desktop and published to Portal before you can import them into Studio Web.
To import a layer preset:
1.Open the Layer Presets settings and click the dropdown beside Add Layer Preset.
2.Click Add Layer Presets from Portal.
The Select Items window opens.
3.Locate the layer preset in your ArcGIS Online or ArcGIS Enterprise Portal.
You can select multiple items and import them in bulk.
4.Click Select to add the items.
The imported items appear in your list of available Layer Presets.
If a layer referenced in the imported layer preset does not exist in the web map of your current app, its configuration is ignored when you activate the layer preset.
If a layer in your web map is not referenced in the imported layer preset, its configuration is set to the default values shown below.