function yamaps_format_values_to_js in Yandex.Maps 7
Same name and namespace in other branches
- 8 yamaps.module \yamaps_format_values_to_js()
Prepares values for js.
Parameters
array $clean_values: Values of map.
Return value
array Prepared values.
3 calls to yamaps_format_values_to_js()
- yamaps_field_widget_form in inc/
yamaps.widget.inc - Implements hook_field_widget_form().
- yamaps_views_plugin_style_default_map::options_form in modules/
yamaps_views/ handlers/ yamaps_views_plugin_style_default_map.inc - Returns Yandex Maps views settings form.
- yamaps_views_plugin_style_default_map::render in modules/
yamaps_views/ handlers/ yamaps_views_plugin_style_default_map.inc - Renders the map.
File
- ./
yamaps.functions.inc, line 169 - Yandex Maps functions used across all components of the module.
Code
function yamaps_format_values_to_js(array $clean_values) {
return [
'coords' => isset($clean_values['coords']) ? drupal_json_decode($clean_values['coords']) : [],
'type' => $clean_values['type'],
'placemarks' => drupal_json_decode($clean_values['placemarks']),
'lines' => drupal_json_decode($clean_values['lines']),
'polygons' => drupal_json_decode($clean_values['polygons']),
'routes' => drupal_json_decode($clean_values['routes']),
];
}