util.cursor.Manager

Cursor manager.

Constructor | Fields | Events | Methods

Constructor

util.cursor.Manager(element)

Manager for cursors over a DOM element. Uses direct assignment via style.cursor.

Parameters:

Parameter

Default value

Description

element*

Type: HTMLElement

The DOM element that cursors are being set for.

* Mandatory parameter/option.

Example:

// putting the "arrow" cursor over the map
var cursor = map.cursors.push('arrow');
setTimeout(function () {
    // setting a different key for the cursor after 5 seconds
    cursor.setKey('grabbing');
    setTimeout(function () {
        // removing this cursor from the map after 5 more seconds
        cursor.remove();
    }, 5000);
}, 5000);

Fields

Name

Type

Description

events

event.Manager

Event manager for the cursor manager.

Events

Name

Description

change

Change to the cursor.

Methods

Name

Returns

Description

push(key)

util.cursor.Accessor

Sets a new cursor and writes it to the stack of cursors for the object.

Fields details

events

{event.Manager} events

Event manager for the cursor manager.

Events details

change

Change to the cursor.

Methods details

push

{util.cursor.Accessor} push(key)

Sets a new cursor and writes it to the stack of cursors for the object.

Returns object providing access to the cursor added to the map.

Parameters:

Parameter

Default value

Description

key*

Type: String

Cursor. Acceptable values:

  • "arrow" - Arrow cursor.
  • "crosshair" - Crosshair cursor.
  • "grab" - Hand cursor.
  • "grabbing" - Closed hand.
  • "help" - Arrow cursor with a question mark.
  • "zoom" - Magnifying glass.
  • "move" - Cursor consisting of four directional arrows.
  • "pointer" - Pointing finger.
  • "inherit" - Inherit the cursor from the parent.

* Mandatory parameter/option.