Documentation
Reference
2.1.56 (current version)
collection
interactivityModel
Interfaces

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:

ParameterDefault valueDescription
element *
[no-highlight[

* Mandatory parameter/option.

]no-highlight]

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

NameTypeDescription
eventsevent.Manager

Event manager for the cursor manager.

Events

NameDescription
change

Change to the cursor.

Methods

NameReturnsDescription
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

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:

ParameterDefault valueDescription
key*
[no-highlight[

* Mandatory parameter/option.

]no-highlight]

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.