← Back to carmenta.com
Carmenta Engine SDK Documentation
×

Layer.EnabledDuringQuickUpdates Property

Determines whether the Layer is temporarily turned off during mouse interactions.

Thread safety: This property is not thread-safe. Show

Syntax

C#
public System.Boolean EnabledDuringQuickUpdates { get; set; }

Property Value

Type: System.Boolean
Default: Differs depending on type. See the table below.
True if layer is enabled even during mouse pan and zooms; False if the layer is temporarily turned off.

Default values

ClassDefault value
AggregatingLayertrue
BitmapLayertrue
CatalogLayertrue
CatalogLoadLayerSettrue
CatalogMaptrue
GlobeTileLayerNot used.
LabelOrganizingLayertrue
LayerSettrue
LoadLayerSettrue
OgcWmsLayertrue
OgcWmsServerLayertrue
OgcWmtsLayertrue
OgcWmtsServerLayertrue
OrdinaryLayertrue
PlotLayertrue
RadarVideoLayertrue
ScreenLayertrue
TileLayertrue

Remarks

This property can be used to turn off the layer during certain mouse interactions. This can improve the frame rate while the user is manipulating the map, and provide better feedback to the user. For instance, text layers and maybe other layers like roads can be turned off while the map is zoomed or panned. The layers will be automatically restored when the interaction is complete.

This is accomplished by setting an update attribute on the view (see View.UpdateAttributes) with the key "quickUpdate". This is done by StandardTool for all updates during mouse pan and zoom interactions. The tool has a property to turn off this feature, even if this parameter is set to False on a layer, see StandardTool.QuickUpdateEnabled.

Note that EnabledDuringQuickUpdates can only be used to turn off a layer during quick updates. If you want to do the opposite, i.e. enable a layer only during quick updates, you can achieve this by setting an appropriate Condition instead, that checks if the "quickUpdate" attribute is set; the condition can formulated simply as

quickUpdate

since the attribute will be either True or undefined (null). This can be used to temporarily enable a fast replacement layer when other, slower layers are disabled with this feature.

Example

C#
// Disable the layer during quick updates
public static void DisableLayerDuringQuickUpdates(Layer layer)
{
    // This property is a member of a type that might be referred to by a View 
    // or a GlobeView, either directly or indirectly through other objects, which means 
    // that you must use the Guard class to take the global configuration lock when it 
    // is modified to synchronize access with any running Carmenta Engine threads.
    using (Guard guard = new Guard())   
    {
        layer.EnabledDuringQuickUpdates = false;
    }
}

Platforms

Windows, Linux, Android

See Also

Reference

Layer Class
Core Module

By accessing the information on this site you accept our terms and conditions and privacy policy.
This site uses cookies to enhance your experience and provide additional functionality.

Accept