Chapter 10. The Marker Drag Library

The kind of interface where the user has to drag a cross or whatever to indicate a location is so common that this library is included to do all the work for you.

ii_marker_drag.js

mkmarker_drag_start(name, cx, cy, type, size, width)

Behaves like markers_add_display except that it returns a special movable marker. The arguments are parallel to those of markers_add_display.

marker_drag_end(mk)

Removes the marker from the screen and makes the position available by calling marker_drag_update.

marker_drag_update(mk)

Ensures that the position of the marker is available as mk.cx and mk.cy.

marker_drag_update_all()

Calls marker_drag_update on all current dragable markers.