SetScale()
Summary
Sets the scale of a map.
Syntax
SetScale(string map_name, real scale_value)
| Argument | Contents |
|---|---|
| map_name | The map whose scale is set |
| scale_value | The denominator of the scale when expressed as a ratio |
Notes
-
SetScale() does not affect the center of the map.
-
The map is not drawn at the new scale until the next call to RedrawMap() or until the map window is uncovered and needs to be redrawn.
-
If the map name argument is null, SetScale() changes the scale of the current map.
Example
SetScale(null, 10000) // Sets map scale to 1:10,000
SetScale("My Map", 250000) // Sets map scale to 1:250,000
Error Codes
| Error Type | Meaning |
|---|---|
| NotFound | There is no map with the specified name |
See Also
| Function | Summary |
|---|---|
| GetLayerAutoscale() | Determines whether a layer is hidden in the current map due to autoscaling |
| GetLayerScale() | Gets the range of scales at which a layer displays (autoscale) |
| GetLayerScaleFlag() | Gets the autoscale flag for a layer |
| GetScale() | Gets the scale of a map |
| GetSetScale() | Gets the range of scales at which a selection set displays (autoscale) |
| SetMapScope() | Sets the area covered by 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) |