}
};
// we want to get notified when the user changes the bounds of the rectangle
// or after he stopped draging the rectangle around or clicking with the mouse
// on it
rectangle.addListener(GEvent.dragend, eventHandler);
rectangle.addListener(GEvent.bounds_changed, eventHandler);
rectangle.addListener(GEvent.mousedown, eventHandler);
rectangle.addListener(GEvent.mouseup, eventHandler);
map.addOverlay(rectangle);