Class: SelectEvent

WIND. SelectEvent

Create an SelectEvent object.

new SelectEvent(evt, annot)

Create a SelectEvent object.
Parameters:
Name Type Description
evt string Defines the user's action.
annot WIND.Annotation The annotation where the event will be triggered.
The evt parameter can be:
  • The "click" event.
  • The "dblclick" event.
  • The "mousedown" event occurs when the mouse pointer is over the annotation, and the mouse button is pressed.
  • The "mouseup" event occurs when the mouse pointer is over the annotation, and the mouse button is released.
  • The "mousemove" event occurs when sthe mouse pointer moves inside the annotation.
  • The "mouseout" and "mouseleave" events occur when the mouse pointer leaves the annotation.
  • The "mouseover" and "mouseenter" events occur when the mouse pointer enters the annotation.
Example
var carte = new WIND.Map('map',{});
	var anot = carte.createAnnotation("Town",Bayonne","Polygon((1 1,2 2,3 3))");*
	var evt = new WIND.SelectEvent("click",anot);

Methods

trigger(callback)

Trigger a javascript function when the UserEvent happens.
Parameters:
Name Type Description
callback function The function that will be triggered.
Example
var carte = new WIND.Map('map',{});
	var anot = carte.createAnnotation("Town",Bayonne","Polygon((1 1,2 2,3 3))");*
	var evt = new WIND.SelectEvent("click",anot);
	evt.trigger(function(e){});