MapContentMilestone.clear

Syntax

clear();

Description

The clear method clears events of DOM item that corresponds to map layer milestone.

Example

To execute the example the HTML page must contain an object of the MapContentMilestone class named milestone (see the page with description of the MapContentMilestone.getMilestonePosition method). Subscribe to all events of DOM item that corresponds to map layer milestone, and process the MouseDown event, showing contents of milestone text area to the browser console:

// Subscribe to all events of the milestone DOM item
milestone._bindEvents();
// Process the MouseDown event
milestone.MouseDown.add(function (sender, args) {
    console.log("Text area contents: " + sender.getContent().getContent());
});

After executing the example on clicking the text area of map layer milestone with the mouse pointer, the browser console displays contents of this area:

Contents of the text area: RU-KYA
 

Now remove all events of the DOM item that corresponds to map layer milestone:

milestone.clear();

After executing the script line, on clicking milestone text area with the mouse pointer the browser console does not show anything.

See also:

MapContentMilestone