Maptitude GISDK Help |
Set whether a layer is visible (displayed) in a map.
SetLayerVisibility(string map_bar_layer, string visibility)
Argument |
Contents |
map_bar_layer |
The name of the map and layer |
visibility |
"True" if the specified layer is shown, otherwise "False" |
If map_bar_layer is null, SetLayerVisibility() affects the current layer in the current map.
If map_bar_layer is a layer name, SetLayerVisibility() affects the current map.
Even if a layer is visible, the autoscale settings for the layer may cause it not to be displayed at the current map scale.
SetLayerScaleFlag() turns autoscaling on or off for a layer without clearing the autoscale settings from the layer, and GetLayerScaleFlag() gets the autoscale flag for a layer. Make sure that the flag is "True" to have autoscaling active for a layer.
// Make States visible but Counties hidden
SetLayerVisibility("States", "True")
SetLayerVisibility("Counties", "False")
// Make States visible in one map, but not the other
SetLayerVisibility("Map #1|States", "True")
SetLayerVisibility("Map #2|States", "False")
Error Type |
Meaning |
NotFound |
The specified layer does not exist or is not in the specified map |
Function |
Summary |
Determines whether a layer is hidden in the current map due to autoscaling |
|
Gets the range of scales at which a layer displays (autoscale) |
|
Gets the autoscale flag for a layer |
|
Determine whether a layer is visible (displayed) in a map |
|
Sets the range of scales at which a layer displays (autoscale) |
|
Sets the autoscale flag for a layer |
|
Changes how features in a selection set are displayed on a map |
©2025 Caliper Corporation | www.caliper.com |