addTo(map) {
        const me = this,
            options = me._options;

        me._map = map;

        if (options.modal) {
            const background = me._background = createElement('div', {
                className: 'modal-panel-background closed'
            }, map.container);

            background.addEventListener('click', () => {
                me.remove();
            });
        }

        const container = me._container = createElement('div', {
            className: `panel closed ${options.className || ''}`,
            innerHTML: [
                '<div id="panel-header">',
                '<div id="panel-title"></div>',
                '<div id="panel-button-group" class="panel-button-group">',
                `<div id="panel-button" class="${options.modal ? 'close-button' : 'slide-button'}"></div>`,
                '</div>',
                '</div>',
                `<div id="panel-body"${isWindows ? ' class="windows"' : ''}>`,
                '<div id="panel-content"></div>',
                '</div>'
            ].join('')
        }, map.container);

        if (me._title) {
            me.setTitle(me._title);
        }
        if (me._html) {
            me.setHTML(me._html);
        }
        if (me._buttons) {
            me.setButtons(me._buttons);
        }

        if (options.modal) {
            container.querySelector('#panel-button').addEventListener('click', () => {
                me.remove();
            });
        } else {
            container.querySelector('#panel-header').addEventListener('click', () => {
                const classList = container.classList;

                if (classList.contains('collapsed')) {
                    classList.remove('collapsed');
                } else {
                    classList.add('collapsed');
                }
            });
            container.querySelector('#panel-header').style.cursor = 'pointer';
        }

        requestAnimationFrame(() => {
            if (options.modal) {
                me._background.classList.remove('closed');
                container.style.height =
                    `min(calc(100% - 10px), ${container.querySelector('#panel-content').offsetHeight + 50}px)`;
            }
            container.classList.remove('closed');
        });

        return me;
    }
Adds the panel to a map.
@param {Map} map - The Mini Tokyo 3D map to add the panel to
@returns {Panel} Returns itself to allow for method chaining