ILIAS  release_8 Revision v8.25-1-g13de6a5eca6
class.ilMapGUI.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
5/* Copyright (c) 2018 - Richard Klees <richard.klees@concepts-and-training.de> - Extended GPL, see LICENSE */
6
10abstract class ilMapGUI
11{
13 protected ilLanguage $lng;
14 protected string $map_id;
15 protected string $width;
16 protected string $height;
17 protected string $latitude;
18 protected string $longitude;
19 protected ?int $zoom;
20 protected bool $enable_type_control;
24 protected array $user_marker;
25 protected bool $large_map_control;
26 protected bool $central_marker;
27
28 public function __construct()
29 {
30 global $DIC;
31 $this->lng = $DIC['lng'];
32 $this->tpl = $DIC['tpl'];
33
34 $this->lng->loadLanguageModule("maps");
35
36 $this->map_id = "";
37 $this->width = "500px";
38 $this->height = "300px";
39 $this->latitude = "";
40 $this->longitude = "";
41 $this->zoom = null;
42 $this->enable_type_control = false;
43 $this->enable_update_listener = false;
44 $this->enable_navigation_control = false;
45 $this->user_marker = [];
46 $this->large_map_control = false;
47 $this->central_marker = false;
48 }
49
50 public function setMapId(string $map_id): ilMapGUI
51 {
52 $this->map_id = $map_id;
53 return $this;
54 }
55
56 public function getMapId(): string
57 {
58 return $this->map_id;
59 }
60
61 public function setWidth(string $width): ilMapGUI
62 {
63 $this->width = $width;
64 return $this;
65 }
66
67 public function getWidth(): string
68 {
69 return $this->width;
70 }
71
72 public function setHeight(string $height): ilMapGUI
73 {
74 $this->height = $height;
75 return $this;
76 }
77
78 public function getHeight(): string
79 {
80 return $this->height;
81 }
82
83 public function setLatitude(string $latitude): ilMapGUI
84 {
85 $this->latitude = $latitude;
86 return $this;
87 }
88
89 public function getLatitude(): string
90 {
91 return $this->latitude;
92 }
93
94 public function setLongitude(string $longitude): ilMapGUI
95 {
96 $this->longitude = $longitude;
97 return $this;
98 }
99
100 public function getLongitude(): string
101 {
102 return $this->longitude;
103 }
104
105 public function setZoom(?int $zoom): ilMapGUI
106 {
107 $this->zoom = $zoom;
108 return $this;
109 }
110
111 public function getZoom(): ?int
112 {
113 return $this->zoom;
114 }
115
117 {
118 $this->enable_type_control = $enable_type_control;
119 return $this;
120 }
121
122 public function getEnableTypeControl(): bool
123 {
125 }
126
128 {
129 $this->enable_navigation_control = $enable_navigation_control;
130 return $this;
131 }
132
133 public function getEnableNavigationControl(): bool
134 {
136 }
137
139 {
140 $this->enable_update_listener = $enable_update_listener;
141 return $this;
142 }
143
144 public function getEnableUpdateListener(): bool
145 {
147 }
148
150 {
151 $this->large_map_control = $large_map_control;
152 return $this;
153 }
154
155 public function getEnableLargeMapControl(): bool
156 {
158 }
159
161 {
162 $this->central_marker = $central_marker;
163 return $this;
164 }
165
166 public function getEnableCentralMarker(): bool
167 {
169 }
170
171 public function addUserMarker(int $user_id): ilMapGUI
172 {
173 $this->user_marker[] = $user_id;
174 return $this;
175 }
176
177 abstract public function getHtml(): string;
178
182 abstract public function getUserListHtml(): string;
183}
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: feed.php:28
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...