Trying to add an event handler to the EDEN Editor map control and defining the control before the event handler itself is added, results in a failure to add the event - it will output no errors and behave as if nothing happened.
See this example;
0 spawn { disableSerialization; _mapControl = (findDisplay 313 displayCtrl 51); _mapControl ctrlAddEventHandler ["MouseButtonUp", { params ["_display", "_button", "_xPos", "_yPos", "_shift", "_ctrl", "_alt"]; _coords = _display ctrlMapScreenToWorld [_xPos, _yPos]; [format["X: %1 | Y: %2", (_coords select 0), (_coords select 1)], 0] call BIS_fnc_3DENNotification; }]; };
However, if you instead use a display event handler and define the control within the code - it does work. Like this;
0 spawn { disableSerialization; _mapControl = (findDisplay 313); _mapControl displayAddEventHandler ["MouseButtonUp", { params ["_display", "_button", "_xPos", "_yPos", "_shift", "_ctrl", "_alt"]; _coords = (_display displayCtrl 51) ctrlMapScreenToWorld [_xPos, _yPos]; [format["X: %1 | Y: %2", (_coords select 0), (_coords select 1)], 0] call BIS_fnc_3DENNotification; }]; };
I'm not entirely sure if this behaviour is to be expected with how the EDEN Editor works, but the former example works during mission play if you use display 12(ingame map).