<div id="div_view_options">
    <fieldset>
        <legend><?php echo __('Display GIS Visualization'); ?></legend>
        <div id="gis_div" style="position:relative;">
            <form method="post" action="tbl_gis_visualization.php">
                <?php echo PMA_URL_getHiddenInputs($url_params); ?>
                <label for="labelColumn">
                    <?php echo __("Label column"); ?>
                </label>
                <select name="visualizationSettings[labelColumn]" id="labelColumn" class="autosubmit">
                    <option value=""><?php echo __("-- None --"); ?></option>
                    <?php foreach ($labelCandidates as $value): ?>
                        <option value="<?php echo $value; ?>" <?php echo ($value == $visualizationSettings['labelColumn'] ? 'selected="selected"' : ''); ?>>
                            <?php echo $value; ?>
                        </option>
                    <?php endforeach; ?>
                </select>
                <label for="spatialColumn">
                    <?php echo __("Spatial column"); ?>
                </label>
                <select name="visualizationSettings[spatialColumn]" id="spatialColumn" class="autosubmit">
                    <?php foreach ($spatialCandidates as $value): ?>
                        <option value="<?php echo $value; ?>" <?php echo ($value == $visualizationSettings['spatialColumn'] ? 'selected="selected"' : ''); ?>>
                            <?php echo $value; ?>
                        </option>
                    <?php endforeach; ?>
                </select>
                <input type="hidden" name="displayVisualization" value="redraw">
                <?php if (! $GLOBALS['PMA_Config']->isHttps()): ?>
                    <tr>
                        <td class="choice" colspan="2">
                            <input type="checkbox"
                                   name="visualizationSettings[choice]"
                                   id="choice" value="useBaseLayer"
                                   <?php if (isset($visualizationSettings['choice'])) echo 'checked="checked"' ?>/>
                            <label for="choice">
                                <?php echo __("Use OpenStreetMaps as Base Layer"); ?>
                            </label>
                        </td>
                    </tr>
                <?php endif; ?>
                <?php echo PMA_Util::getStartAndNumberOfRowsPanel($sql_query); ?>
            </form>

            <div class="pma_quick_warp" style="width: 50px; position: absolute; right: 0; top: 0; cursor: pointer;">
                <div class="drop_list">
                    <span class="drop_button" style="padding: 0; border: 0;">
                        <?php echo PMA_Util::getImage('b_saveimage', __('Save')); ?>
                    </span>
                    <ul>
                        <li class="warp_link">
                            <a href="<?php echo $downloadUrl . '&fileFormat=png'; ?>" class="disableAjax">PNG</a>
                        </li>
                        <li class="warp_link">
                            <a href="<?php echo $downloadUrl . '&fileFormat=pdf'; ?>" class="disableAjax">PDF</a>
                        </li>
                        <?php if ($svgSupport): ?>
                            <li class="warp_link">
                                <a href="<?php echo $downloadUrl . '&fileFormat=svg'; ?>" class="disableAjax">SVG</a>
                            </li>
                        <?php endif; ?>
                    </ul>
                </div>
            </div>
        </div>

        <div style="clear:both;">&nbsp;</div>

        <div id="placeholder"
             style="width:<?php echo htmlspecialchars($visualizationSettings['width']); ?>px;height:<?php echo htmlspecialchars($visualizationSettings['height']); ?>px;">
            <?php echo $visualization; ?>
        </div>
        <div id="openlayersmap"></div>
        <input type="hidden" id="pmaThemeImage" value="<?php echo $GLOBALS['pmaThemeImage']; ?>" />
        <script language="javascript" type="text/javascript">
            function drawOpenLayers()
            {
                <?php if (! $GLOBALS['PMA_Config']->isHttps()): ?>
                    <?php echo $drawOl; ?>
                <?php endif; ?>
            }
        </script>
    </fieldset>
</div>