generateParams($_REQUEST['value'])); } // Generate Well Known Text $srid = (isset($gis_data['srid']) && $gis_data['srid'] != '') ? htmlspecialchars($gis_data['srid']) : 0; $wkt = $gis_obj->generateWkt($gis_data, 0); $wkt_with_zero = $gis_obj->generateWkt($gis_data, 0, '0'); $result = "'" . $wkt . "'," . $srid; // Generate PNG or SVG based visualization $format = (PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER <= 8) ? 'png' : 'svg'; $visualizationSettings = array('width' => 450, 'height' => 300, 'spatialColumn' => 'wkt'); $data = array(array('wkt' => $wkt_with_zero, 'srid' => $srid)); $visualization = PMA_GIS_visualizationResults($data, $visualizationSettings, $format); $open_layers = PMA_GIS_visualizationResults($data, $visualizationSettings, 'ol'); // If the call is to update the WKT and visualization make an AJAX response if (isset($_REQUEST['generate']) && $_REQUEST['generate'] == true) { $extra_data = array( 'result' => $result, 'visualization' => $visualization, 'openLayers' => $open_layers, ); $response = PMA_Response::getInstance(); $response->addJSON($extra_data); exit; } ob_start(); ?>
addJSON('gis_editor', ob_get_contents()); ob_end_clean(); ?>