From fccaa86091fed7017344fec0cb7c84713434fb0d Mon Sep 17 00:00:00 2001 From: otrok7 <50595291+otrok7@users.noreply.github.com> Date: Sat, 6 Jan 2024 22:00:56 +0100 Subject: [PATCH] fix centerMe --- croutonjs/meetingMap/meeting_map.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/croutonjs/meetingMap/meeting_map.php b/croutonjs/meetingMap/meeting_map.php index 572852d..c6d833c 100644 --- a/croutonjs/meetingMap/meeting_map.php +++ b/croutonjs/meetingMap/meeting_map.php @@ -32,6 +32,8 @@ class Controller 'map_search_location' => '', 'map_search_coordinate_search' => '', 'map_search_zoom' => '', + 'center_me' => '', + 'goto' => '' ); public $options = array(); @@ -208,6 +210,12 @@ private function createJavascriptConfig($options) $ret .= 'lat:"'.$options['lat'].'",'; $ret .= 'lng:"'.$options['lng'].'",'; $ret .= 'zoom:"'.$options['zoom'].'",'; + if (!empty($options['center_me'])) { + $ret .= 'centerMe:"'.$options['center_me'].'",'; + } + if (!empty($options['goto'])) { + $ret .= 'goto:"'.$options['goto'].'",'; + } if (isset($options['map_search'])) { $ret .= 'map_search: {'; foreach ($options['map_search'] as $key => $value) {