| Maptitude GISDK Help |
Gets the range of scales at which a layer displays (autoscale).
scales = GetLayerScale(string layer_name)
| Argument | Contents |
|---|---|
| layer_name | The name of the layer |
An array of two elements:
| Element | Type | Contents |
|---|---|---|
| 1 | Real | The minimum scale at which the layer displays, or null if there is no minimum |
| 2 | Real | The maximum scale at which the layer displays, or null if there is no maximum |
GetLayerScale() returns autoscale information for the current map only; the autoscale parameters for a layer can vary from map to map.
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.
// Display the minimum scale of the County layer
scales = GetLayerScale("County")
if scales[1] = null then ShowMessage("There is no minimum scale.")
else ShowMessage("The minimum scale is: " + r2s(scales[1]))
| Error Type | Meaning |
|---|---|
| NotFound | The specified layer does not exist |
| Function | Summary |
|---|---|
| GetLayerAutoscale() | Determines whether a layer is hidden in the current map due to autoscaling |
| GetLayerScaleFlag() | Gets the autoscale flag for a layer |
| GetSetScale() | Gets the range of scales at which a selection set displays (autoscale) |
| GetScale() | Gets the scale of a map |
| SetLayerScale() | Sets the range of scales at which a layer displays (autoscale) |
| SetLayerScaleFlag() | Sets the autoscale flag for a layer |
| SetSetScale() | Sets the range of scales at which a selection set displays (autoscale) |
| SetScale() | Sets the scale of a map |
| ©2025 Caliper Corporation | www.caliper.com |