Purpose
Establishes the coordinates of a paper map on a digitizing tablet; also turns Digitizer Mode on or off. You can issue this statement from the MapBasic window in MapInfo Pro.
Syntax 1
Set Digitizer
( mapx1, mapy1 ) ( tabletx1, tablety1 ) [ Label name ] ,
( mapx2, mapy2 ) ( tabletx2, tablety2 ) [ Label name ]
[ , ... ]
CoordSys...
[ Units... ]
[ Width tabletwidth ]
[ Height tabletheight ]
[ Resolution xresolution, yresolution ]
[ Button click_button_num, double_click_button_num ]
[ Mode { On | Off } ]
Syntax 2
Set Digitizer Mode { On | Off }
mapx parameters specify East-West Earth positions on the paper map.
mapy parameters specify North-South Earth positions on the paper map.
tabletx parameters specify tablet right-left positions corresponding to the mapx values.
tablety parameters specify tablet up-down positions corresponding to the mapy values.
name is and optional label for the control points.
The CoordSys clause specifies the coordinate system used by the paper map.
click_button_num is the number of the puck button that simulates a click action.
double_click_button_num is the number of the puck button that simulates a double-click.
Description
The Set Digitizer statement controls the same settings as the Digitizer Setup dialog box in MapInfo Pro's Map menu. These settings relate to a specific paper map that the user has attached to the tablet. The Set Digitizer statement does not relate to other digitizer setup options, such as communications port or baud rate settings; those settings must be configured outside of a MapBasic application.
The Set Digitizer statement tells MapInfo Pro the coordinate system used by the paper map, and specifies two or more control points. Each control point consists of a map coordinate pair (for example, longitude, latitude) followed by a tablet coordinate pair. The tablet coordinate pair represents the position on the tablet corresponding to the specified map coordinates. Tablet coordinates represent the distance, in native digitizer units (such as thousandths of an inch), from the point on the tablet to the tablet's upper left corner.
The CoordSys clause specifies the coordinate system used by the paper map. For more details, see CoordSys clause.
The Width, Height, and Resolution clauses are for MapInfo Pro internal use only. MapInfo Pro stores these clauses, when necessary, in workspaces. MapBasic programs do not need to specify these clauses.
Turning Digitizer Mode On or Off
Once the digitizer is configured, the user can toggle Digitizer Mode on or off by pressing the D key. To toggle Digitizer Mode from a MapBasic program, specify
Set Digitizer Mode On
or
Set Digitizer Mode Off
To determine whether Digitizer Mode is currently on or off, call SystemInfo(SYS_INFO_DIG_MODE), which returns TRUE if Digitizer Mode is on.
When Digitizer Mode is on and the active window is a Map window, the digitizer cursor (a large crosshair) appears in the window; the digitizer and the mouse have separate cursors.
If Digitizer Mode is off, or if the active window is not a Map window, the digitizer cursor does not display and the digitizer controls the mouse cursor (if your digitizer driver provides mouse emulation).
See Also:
CoordSys clause, SystemInfo() function