Skip to content
Snippets Groups Projects
Commit 92662ff7 authored by Alexandre Dias's avatar Alexandre Dias Committed by Claudiu Cristea
Browse files

ISAICP-8916: Missing map formatter change.

parent 6bfb746b
No related branches found
No related tags found
1 merge request!209Release 2.2.0
......@@ -32,8 +32,9 @@ public function viewElements(FieldItemListInterface $items, $langcode) {
if (!$entity->hasField('field_location')) {
throw new \InvalidArgumentException('Can only display map for fields that are linked to a location.');
}
$json_data['layers'][0]['markers']['features'][0]['properties']['name'] = $entity->label();
$json_data['layers'][0]['markers']['features'][0]['properties']['description'] = $entity->field_location->value ?? '';
$json_data['layers']['markers'][0]['data']['features'][0]['properties']['name'] = $entity->label();
$json_data['layers']['markers'][0]['data']['features'][0]['properties']['description'] = $entity->field_location->value ?? '';
$json->setJson($json_data);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment