eventToPosition(e) {
        let x, y;
        if ("touches" in e) {
            x = e.touches[0].clientX;
            y = e.touches[0].clientY;
        }
        else {
            x = e.clientX;
            y = e.clientY;
        }
        return this._backend.eventToPosition(x, y);
    }
Convert a DOM event (mouse or touch) to map coordinates. Uses first touch for multi-touch.
@param {Event} e event
@returns {int[2]} -1 for values outside of the canvas