ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilMapGUI.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
24abstract 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;
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
131 {
132 $this->enable_type_control = $enable_type_control;
133 return $this;
134 }
135
136 public function getEnableTypeControl(): bool
137 {
139 }
140
142 {
143 $this->enable_navigation_control = $enable_navigation_control;
144 return $this;
145 }
146
147 public function getEnableNavigationControl(): bool
148 {
150 }
151
153 {
154 $this->enable_update_listener = $enable_update_listener;
155 return $this;
156 }
157
158 public function getEnableUpdateListener(): bool
159 {
161 }
162
164 {
165 $this->large_map_control = $large_map_control;
166 return $this;
167 }
168
169 public function getEnableLargeMapControl(): bool
170 {
172 }
173
175 {
176 $this->central_marker = $central_marker;
177 return $this;
178 }
179
180 public function getEnableCentralMarker(): bool
181 {
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}
language handling
User interface class for maps.
bool $enable_type_control
setMapId(string $map_id)
setEnableCentralMarker(bool $central_marker)
setZoom(?int $zoom)
setEnableTypeControl(bool $enable_type_control)
setLongitude(string $longitude)
setHeight(string $height)
setEnableLargeMapControl(bool $large_map_control)
getEnableCentralMarker()
string $map_id
array $user_marker
getEnableTypeControl()
getEnableLargeMapControl()
getEnableNavigationControl()
getUserListHtml()
Get User List HTML (to be displayed besides the map)
setEnableUpdateListener(bool $enable_update_listener)
string $height
setLatitude(string $latitude)
bool $enable_update_listener
bool $large_map_control
ilGlobalTemplateInterface $tpl
string $longitude
setEnableNavigationControl(bool $enable_navigation_control)
bool $central_marker
setWidth(string $width)
addUserMarker(int $user_id)
getEnableUpdateListener()
ilLanguage $lng
bool $enable_navigation_control
string $width
string $latitude
global $DIC
Definition: shib_login.php:26