JSControl

API for managing map control features.

Create Module.getControl API.

var object = Module.getControl();

Function

activeMouse(type) → boolean

Set mouse callback event.

Name
Type
Description

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.

Name
Type
Description

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.

Name
Type
Description

type

boolean

true: Enable keyboard events. false: Disable keyboard events.

getKeyPanMode(), setKeyPanMode(type) → boolean

Enables or disables pan events triggered by the arrow keys.

The default value for keyboard panning is true.

Name
Type
Description

type

boolean

true: 이벤트 활성화. false: 이벤트 비활성화.

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.

Name
Type
Description

type

boolean

true: Enable events. false: Disable events.

getKeyZoomMode(), setKeyZoomMode(type) → boolean

Enables or disables zoom events triggered by the home and end keys.

The default value for keyboard zoom is true.

Name
Type
Description

type

boolean

true: Enable events. false: Disable events.

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.

Name
Type
Description

type

boolean

true: Enable events. false: Disable events.

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.

Name
Type
Description

type

boolean

true: Enable events. false: Disable events.

getMouseWheelDelta(), setMouseWheelDelta(value) → number

Sets the zoom ratio for map zooming with the mouse wheel.

The input variable (value) should be greater than 0.

Name
Type
Description

value

number

Zoom ratio value.

getMouseWheelMode(), setMouseWheelMode(type) → boolean

Sets the direction inversion for map zooming with the mouse wheel.

The default direction value is false.

Name
Type
Description

type

boolean

true: Inverted direction. false: Default direction.

  • Return:

    • true: Inverted direction for zooming.

    • false: Default direction for zooming.

  • Sample

getMouseZoomMode(), setMouseZoomMode(type) → boolean

Enables or disables zoom events triggered by the mouse wheel.

The default value for mouse zooming is true.

Name
Type
Description

type

boolean

true: Enable events. false: Disable events.

getRotateSensitivity(), setRotateSensitivity(value) → number

Sets the rotation sensitivity for the camera.

The input variable (value) should be set between 1.0 and 10.0.

Name
Type
Description

value

number

Rotation ratio value.

  • Return:

    • number: The set camera rotation ratio value.

Last updated