getSettings() as $setting => $val) { if (! isset($visualizationSettings[$setting])) { $visualizationSettings[$setting] = $val; } } } if ($format == 'svg') { return $visualization->asSvg(); } elseif ($format == 'png') { return $visualization->asPng(); } elseif ($format == 'ol') { return $visualization->asOl(); } } } /** * Generate visualization for the GIS query results and save it to a file. * * @param array $data data for the status chart * @param array $visualizationSettings settings used to generate the chart * @param string $format format of the visulaization * @param string $fileName file name * * @return file File containing the visualization */ function PMA_GIS_saveToFile($data, $visualizationSettings, $format, $fileName) { include_once './libraries/gis/pma_gis_visualization.php'; include_once './libraries/gis/pma_gis_factory.php'; if (isset($data[0])) { $visualization = new PMA_GIS_Visualization($data, $visualizationSettings); if ($format == 'svg') { $visualization->toFileAsSvg($fileName); } elseif ($format == 'png') { $visualization->toFileAsPng($fileName); } elseif ($format == 'pdf') { $visualization->toFileAsPdf($fileName); } } } /** * Function to get html for the lebel column and spatial column * * @param string $column the column type. i.e either "labelColumn" * or "spatialColumn" * @param array $columnCandidates the list of select options * @param array $visualizationSettings visualization settings * * @return string $html */ function PMA_getHtmlForColumn($column, $columnCandidates, $visualizationSettings) { $html = '