ClickScope()

Summary

Awaits user input from the system pointer, accepts a rectangle, and returns a scope.

Syntax

scope = ClickScope()

Returns

The scope calculated from the indicated rectangle.

Notes

  • The input rectangle may not be entirely "on the earth." If the center of the rectangle, or at least two of the midpoints of the sides of the rectangle are projectable, a scope is constructed from the input rectangle, and adjusted as necessary.

  • If a uselessly small rectangle or only a click is input, the returned scope will have zero width and height, and a center at the click or drag starting point.

  • ClickScope() is recommended for getting user input for zooming on a map window.

  • This function should be called only from a macro that is activated from the menus, or from a tool in a toolbox or toolbar. Calling it from any other type of dialog box often causes confusion about which window is active (the dialog box, versus the map).

  • For a full list of scope-related GISDK functions, see Map Scales and Scopes.

Example

scp = ClickScope()
SetMapScope(null, scp)

Error Codes

Error Type Meaning
Escape The user clicked Cancel
NotFound The input rectangle did not meet the minimum criteria discussed in the Notes, above, for constructing a valid scope

See Also

Function Summary
ClickRectScope() Awaits user input from the system pointer, accepts a rectangle whose center is a valid world point, and returns a scope
ClickEllipseScope() Awaits user input from the system pointer, accepts an ellipse, and returns a scope