Skip to content

Commit

Permalink
Added diffusion method 'build_geolocation_data_geojson' (converts tex…
Browse files Browse the repository at this point in the history
…t area value to geojson data)
  • Loading branch information
Juan Francisco Onielfa Veneros committed Nov 25, 2020
1 parent 4942072 commit dab52b1
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/dedalo/config/version.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1950,6 +1950,9 @@
Fix issue wit double quotes on set config_auto.php file contents
Valencia 25-11-2020 5.7.14
Added diffusion method 'build_geolocation_data_geojson' (converts text area value to geojson data)
WORK IN PROGRESS
component_date : mark as "red or similar" restricted an other terms based in x param..
Expand All @@ -1970,7 +1973,7 @@


# Version
$DEDALO_VERSION = '5.7.13';
$DEDALO_VERSION = '5.7.14';
if(defined('DEVELOPMENT_SERVER') && DEVELOPMENT_SERVER===true) {
$DEDALO_VERSION .= '.'.time();
}
Expand Down
22 changes: 22 additions & 0 deletions lib/dedalo/diffusion/class.diffusion_sql.php
Original file line number Diff line number Diff line change
Expand Up @@ -3384,6 +3384,28 @@ public static function build_geolocation_data($options, $dato) {



/**
* BUILD_GEOLOCATION_DATA_GEOJSON
* @return string
*/
public static function build_geolocation_data_geojson($options, $dato) {

$request_options = new stdClass();
$request_options->raw_text = $dato;

$options = new stdClass();
$options->raw_text = false;
foreach ($request_options as $key => $value) {if (property_exists($options, $key)) $options->$key = $value;}


$ar_elements = component_text_area::build_geolocation_data_geojson($options->raw_text);
$response = json_encode($ar_elements, JSON_UNESCAPED_UNICODE);

return (string)$response; // json_encoded object
}//end build_geolocation_data_geojson



/**
* RETURN_EMPTY_STRING
* Fake method to return true always
Expand Down

0 comments on commit dab52b1

Please sign in to comment.