public function Here::alterCommonMap in Geolocation Field 8.3
Same name and namespace in other branches
- 8.2 modules/geolocation_here/src/Plugin/geolocation/MapProvider/Here.php \Drupal\geolocation_here\Plugin\geolocation\MapProvider\Here::alterCommonMap()
Alter common map build array.
Parameters
array $render_array: Render array.
array $map_settings: The current map settings.
array $context: Context like field formatter, field widget or view.
Return value
array Render attachments.
Overrides MapProviderBase::alterCommonMap
File
- modules/
geolocation_here/ src/ Plugin/ geolocation/ MapProvider/ Here.php, line 154
Class
- Here
- Provides HERE Maps API.
Namespace
Drupal\geolocation_here\Plugin\geolocation\MapProviderCode
public function alterCommonMap(array $render_array, array $map_settings, array $context) {
$render_array['#attached'] = BubbleableMetadata::mergeAttachments(empty($render_array['#attached']) ? [] : $render_array['#attached'], [
'library' => [
'geolocation_here/commonmap.here',
],
]);
return $render_array;
}