- //Add multi map
- $this->context['multimap'] = $this->map->getMultiMap($this->context['user']['multimap'], $this->modified->getTimestamp(), $this->context['locations']);
+ //With locations
+ if (!empty($this->context['locations'])) {
+ //Set coordinates
+ $coordinates = [];
+
+ //Iterate on each locations
+ foreach($this->context['locations'] as $location) {
+ //Add coordinates
+ $coordinates[] = [ $location['latitude'], $location['longitude'] ];
+ }
+
+ //Add multi map
+ #TODO: add multimap.link here ???
+ //$this->context['multimap'] = $this->map->getMultiMap($this->context['user']['multimap'], $this->modified->getTimestamp(), $this->context['locations']);
+ $this->context['multimap'] = $this->image->getMulti($coordinates) + ['caption' => $this->context['user']['multimap']];
+ }