26 public function init(): void
40 [
"Latitude" =>
"0",
"Longitude" =>
"0",
"Zoom" =>
"3"]
46 if (!is_null($a_lat)) {
47 $this->getChildNode()->setAttribute(
"Latitude", (
string) $a_lat);
49 if ($this->getChildNode()->hasAttribute(
"Latitude")) {
50 $this->getChildNode()->removeAttribute(
"Latitude");
57 if (is_object($this->getChildNode())) {
58 return (
float) $this->getChildNode()->getAttribute(
"Latitude");
65 if (!is_null($a_long)) {
66 $this->getChildNode()->setAttribute(
"Longitude", $a_long);
68 if ($this->getChildNode()->hasAttribute(
"Longitude")) {
69 $this->getChildNode()->removeAttribute(
"Longitude");
76 if (is_object($this->getChildNode())) {
77 return (
float) $this->getChildNode()->getAttribute(
"Longitude");
82 public function setZoom(?
int $a_zoom): void
85 $this->getChildNode()->setAttribute(
"Zoom", (
int) $a_zoom);
95 if (is_object($this->getChildNode())) {
96 return (
int) $this->getChildNode()->getAttribute(
"Zoom");
104 string $a_horizontal_align
106 if (is_object($this->getChildNode())) {
107 $this->dom_util->setFirstOptionalElement(
108 $this->getChildNode(),
112 array(
"Width" => (
string) $a_width,
113 "Height" => (
string) $a_height,
"HorizontalAlign" => $a_horizontal_align)
120 if (is_object($this->getChildNode())) {
121 foreach ($this->getChildNode()->childNodes as $child) {
122 if ($child->nodeName ==
"Layout") {
123 $w = $child->getAttribute(
"Width")
124 ? (
int) $child->getAttribute(
"Width")
135 if (is_object($this->getChildNode())) {
136 foreach ($this->getChildNode()->childNodes as $child) {
137 if ($child->nodeName ==
"Layout") {
138 $h = $child->getAttribute(
"Height")
139 ? (
int) $child->getAttribute(
"Height")
150 if (is_object($this->getChildNode())) {
151 foreach ($this->getChildNode()->childNodes as $child) {
152 if ($child->nodeName ==
"Layout") {
153 return $child->getAttribute(
"HorizontalAlign");
162 if (is_object($this->getChildNode())) {
163 $this->dom_util->setFirstOptionalElement(
164 $this->getChildNode(),
175 if (is_object($this->getChildNode())) {
176 foreach ($this->getChildNode()->childNodes as $child) {
177 if ($child->nodeName ==
"MapCaption") {
178 return $this->dom_util->getContent($child);
188 $a_text = str_replace(chr(13) . chr(10),
"<br />", $a_text);
189 $a_text = str_replace(chr(13),
"<br />", $a_text);
190 $a_text = str_replace(chr(10),
"<br />", $a_text);
198 $a_text = str_replace(
"<br />",
"\n", $a_text);
199 $a_text = str_replace(
"<br/>",
"\n", $a_text);
207 bool $a_abstract_only =
false
210 $start = strpos($a_output,
"[[[[[Map;");
211 if (is_int($start)) {
212 $end = strpos($a_output,
"]]]]]", $start);
216 $param = substr($a_output, $start + 9, $end - $start - 9);
221 $map_gui->setMapId(
"map_" . $i)
225 ->setWidth(
$param[3] .
"px")
226 ->setHeight(
$param[4] .
"px")
227 ->setEnableTypeControl(
true)
228 ->setEnableNavigationControl(
true)
229 ->setEnableCentralMarker(
true);
230 $h2 = substr($a_output, 0, $start) .
231 $map_gui->getHtml() .
232 substr($a_output, $end + 5);
236 $start = strpos($a_output,
"[[[[[Map;", $start + 5);
238 if (is_int($start)) {
239 $end = strpos($a_output,
"]]]]]", $start);
static getMapGUI()
Get an instance of the GUI class.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setLayout(?int $a_width, ?int $a_height, string $a_horizontal_align)
setLongitude(?float $a_long=null)
static handleCaptionInput(string $a_text)
modifyPageContentPostXsl(string $a_output, string $a_mode, bool $a_abstract_only=false)
Modify page content after xsl.
static handleCaptionFormOutput(string $a_text)
setLatitude(?float $a_lat=null)
setCaption(string $a_caption)
create(ilPageObject $a_pg_obj, string $a_hier_id, string $a_pc_id="")
Content object of ilPageObject (see ILIAS DTD).
createInitialChildNode(string $hier_id, string $pc_id, string $child, array $child_attributes=[])
setType(string $a_type)
Set Type.
Class ilPageObject Handles PageObjects of ILIAS Learning Modules (see ILIAS DTD)
if(!file_exists('../ilias.ini.php'))