ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
class.ilMapGUI.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
24 abstract class ilMapGUI
25 {
27  protected ilLanguage $lng;
28  protected string $map_id;
29  protected string $width;
30  protected string $height;
31  protected string $latitude;
32  protected string $longitude;
33  protected ?int $zoom;
34  protected bool $enable_type_control;
35  protected bool $enable_update_listener;
38  protected array $user_marker;
39  protected bool $large_map_control;
40  protected bool $central_marker;
41 
42  public function __construct()
43  {
44  global $DIC;
45  $this->lng = $DIC['lng'];
46  $this->tpl = $DIC['tpl'];
47 
48  $this->lng->loadLanguageModule("maps");
49 
50  $this->map_id = "";
51  $this->width = "500px";
52  $this->height = "300px";
53  $this->latitude = "";
54  $this->longitude = "";
55  $this->zoom = null;
56  $this->enable_type_control = false;
57  $this->enable_update_listener = false;
58  $this->enable_navigation_control = false;
59  $this->user_marker = [];
60  $this->large_map_control = false;
61  $this->central_marker = false;
62  }
63 
64  public function setMapId(string $map_id): ilMapGUI
65  {
66  $this->map_id = $map_id;
67  return $this;
68  }
69 
70  public function getMapId(): string
71  {
72  return $this->map_id;
73  }
74 
75  public function setWidth(string $width): ilMapGUI
76  {
77  $this->width = $width;
78  return $this;
79  }
80 
81  public function getWidth(): string
82  {
83  return $this->width;
84  }
85 
86  public function setHeight(string $height): ilMapGUI
87  {
88  $this->height = $height;
89  return $this;
90  }
91 
92  public function getHeight(): string
93  {
94  return $this->height;
95  }
96 
97  public function setLatitude(string $latitude): ilMapGUI
98  {
99  $this->latitude = $latitude;
100  return $this;
101  }
102 
103  public function getLatitude(): string
104  {
105  return $this->latitude;
106  }
107 
108  public function setLongitude(string $longitude): ilMapGUI
109  {
110  $this->longitude = $longitude;
111  return $this;
112  }
113 
114  public function getLongitude(): string
115  {
116  return $this->longitude;
117  }
118 
119  public function setZoom(?int $zoom): ilMapGUI
120  {
121  $this->zoom = $zoom;
122  return $this;
123  }
124 
125  public function getZoom(): ?int
126  {
127  return $this->zoom;
128  }
129 
130  public function setEnableTypeControl(bool $enable_type_control): ilMapGUI
131  {
132  $this->enable_type_control = $enable_type_control;
133  return $this;
134  }
135 
136  public function getEnableTypeControl(): bool
137  {
139  }
140 
141  public function setEnableNavigationControl(bool $enable_navigation_control): ilMapGUI
142  {
143  $this->enable_navigation_control = $enable_navigation_control;
144  return $this;
145  }
146 
147  public function getEnableNavigationControl(): bool
148  {
150  }
151 
152  public function setEnableUpdateListener(bool $enable_update_listener): ilMapGUI
153  {
154  $this->enable_update_listener = $enable_update_listener;
155  return $this;
156  }
157 
158  public function getEnableUpdateListener(): bool
159  {
161  }
162 
163  public function setEnableLargeMapControl(bool $large_map_control): ilMapGUI
164  {
165  $this->large_map_control = $large_map_control;
166  return $this;
167  }
168 
169  public function getEnableLargeMapControl(): bool
170  {
172  }
173 
174  public function setEnableCentralMarker(bool $central_marker): ilMapGUI
175  {
176  $this->central_marker = $central_marker;
177  return $this;
178  }
179 
180  public function getEnableCentralMarker(): bool
181  {
182  return $this->central_marker;
183  }
184 
185  public function addUserMarker(int $user_id): ilMapGUI
186  {
187  $this->user_marker[] = $user_id;
188  return $this;
189  }
190 
191  abstract public function getHtml(): string;
192 
196  abstract public function getUserListHtml(): string;
197 }
bool $central_marker
ilLanguage $lng
ilGlobalTemplateInterface $tpl
string $height
bool $enable_update_listener
setLongitude(string $longitude)
setEnableUpdateListener(bool $enable_update_listener)
array $user_marker
setEnableCentralMarker(bool $central_marker)
getUserListHtml()
Get User List HTML (to be displayed besides the map)
setZoom(?int $zoom)
setLatitude(string $latitude)
string $latitude
setEnableTypeControl(bool $enable_type_control)
getEnableCentralMarker()
getEnableUpdateListener()
setMapId(string $map_id)
setEnableLargeMapControl(bool $large_map_control)
addUserMarker(int $user_id)
getEnableLargeMapControl()
string $width
getEnableNavigationControl()
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
string $map_id
global $DIC
Definition: shib_login.php:26
setWidth(string $width)
bool $large_map_control
getEnableTypeControl()
bool $enable_type_control
bool $enable_navigation_control
setHeight(string $height)
User interface class for maps.
setEnableNavigationControl(bool $enable_navigation_control)
string $longitude