JSControl
API for managing map control features.
Create Module.getControl API.
var object = Module.getControl();
Function
activeMouse(type) → boolean
Set mouse callback event.
type
boolean
true to activate mouse callback event. false to deactivate mouse callback event.
Return
true: Mouse callback event activated.
false: Mouse callback event deactivated.
setMouseWheelCenterMode(type)
Set whether zooming actions by mouse wheel are centered around the mouse cursor.
type
boolean
true for zooming centered on screen. false for zooming centered on mouse position.
Getter / Setter
getKeyControlEnable(), setKeyControlEnable(type) → boolean
Enables or disables camera control via the keyboard.
Keyboard default input keys for camera events:
Arrow keys: Move forward, backward, left, right.
delete, q: Rotate left.
insert, e: Rotate right.
home: Zoom in.
end: Zoom out.
pageup: Tilt up.
pagedown: Tilt down.
type
boolean
true: Enable keyboard events. false: Disable keyboard events.
Return
true: Enabled.
false: Disabled.
Sample
See function setMouseOption.
getKeyPanMode(), setKeyPanMode(type) → boolean
Enables or disables pan events triggered by the arrow keys.
The default value for keyboard panning is true.
type
boolean
true: 이벤트 활성화. false: 이벤트 비활성화.
Return
true: Enabled.
false: Disabled.
Sample
See function setMouseOption.
getKeyRotMode(), setKeyRotMode(type) → boolean
Enables or disables rotation events triggered by Q, E, delete, insert, pageup, and pagedown keys.
The default value for keyboard rotation is true.
type
boolean
true: Enable events. false: Disable events.
Return:
true: Enabled.
false: Disabled.
Sample
See function setMouseOption.
getKeyZoomMode(), setKeyZoomMode(type) → boolean
Enables or disables zoom events triggered by the home and end keys.
The default value for keyboard zoom is true.
type
boolean
true: Enable events. false: Disable events.
Return:
true: Enabled.
false: Disabled.
Sample
See function setMouseOption.
getMousePanMode(), setMousePanMode(type) → boolean
Enables or disables pan events triggered by dragging with the left mouse button.
The default value for mouse panning is true.
type
boolean
true: Enable events. false: Disable events.
Return:
true: Enabled.
false: Disabled.
Sample
See function setMouseOption.
getMouseRotMode(), setMouseRotMode(type)→ boolean
Enables or disables rotation events triggered by dragging with the right mouse button.
The default value for mouse rotation is true.
type
boolean
true: Enable events. false: Disable events.
Return:
true: Enabled.
false: Disabled.
Sample
See function setMouseOption.
getMouseWheelDelta(), setMouseWheelDelta(value) → number
Sets the zoom ratio for map zooming with the mouse wheel.
The input variable (value) should be greater than 0.
value
number
Zoom ratio value.
Return:
number: The set mouse zoom ratio value.
Sample
See function setMouseWheelDelta.
getMouseWheelMode(), setMouseWheelMode(type) → boolean
Sets the direction inversion for map zooming with the mouse wheel.
The default direction value is false.
type
boolean
true: Inverted direction. false: Default direction.
Return:
true: Inverted direction for zooming.
false: Default direction for zooming.
Sample
See function setMouseInvert.
getMouseZoomMode(), setMouseZoomMode(type) → boolean
Enables or disables zoom events triggered by the mouse wheel.
The default value for mouse zooming is true.
type
boolean
true: Enable events. false: Disable events.
Return:
true: Enabled.
false: Disabled.
Sample:
See function setMouseOption.
getRotateSensitivity(), setRotateSensitivity(value) → number
Sets the rotation sensitivity for the camera.
The input variable (value) should be set between 1.0 and 10.0.
value
number
Rotation ratio value.
Return:
number: The set camera rotation ratio value.
Last updated