33require_once(
"Services/Maps/classes/class.ilMapGUI.php");
39 parent::__construct();
54 "tpl.google_map.html",
60 require_once(
"Services/Maps/classes/class.ilMapUtil.php");
62 $tpl->addJavaScript(
"Services/Maps/js/ServiceGoogleMaps.js");
66 foreach ($this->user_marker as $user_id) {
69 if (
$user->getLatitude() != 0 &&
$user->getLongitude() != 0 &&
70 $user->getPref(
"public_location") ==
"y") {
71 $this->tpl->setCurrentBlock(
"user_marker");
72 $this->tpl->setVariable(
76 $this->tpl->setVariable(
"CNT", $cnt);
78 $this->tpl->setVariable(
"ULAT", htmlspecialchars(
$user->getLatitude()));
79 $this->tpl->setVariable(
"ULONG", htmlspecialchars(
$user->getLongitude()));
80 $info = htmlspecialchars(
$user->getFirstName() .
" " .
$user->getLastName());
82 if (
$user->getPref(
"public_institution") ==
"y") {
83 $info .= $delim . htmlspecialchars(
$user->getInstitution());
86 if (
$user->getPref(
"public_department") ==
"y") {
87 $info .= $delim . htmlspecialchars(
$user->getDepartment());
90 if (
$user->getPref(
"public_street") ==
"y") {
91 $info .= $delim . htmlspecialchars(
$user->getStreet());
93 if (
$user->getPref(
"public_zip") ==
"y") {
94 $info .= $delim . htmlspecialchars(
$user->getZipcode());
97 if (
$user->getPref(
"public_city") ==
"y") {
98 $info .= $delim . htmlspecialchars(
$user->getCity());
101 if (
$user->getPref(
"public_country") ==
"y") {
102 $info .= $delim . htmlspecialchars(
$user->getCountry());
104 $this->tpl->setVariable(
108 $this->tpl->setVariable(
110 $user->getPersonalPicturePath(
"xsmall")
112 $this->tpl->parseCurrentBlock();
118 $this->tpl->setVariable(
"MAP_ID", $this->
getMapId());
119 $this->tpl->setVariable(
"WIDTH", $this->
getWidth());
120 $this->tpl->setVariable(
"HEIGHT", $this->
getHeight());
121 $this->tpl->setVariable(
"LAT", $this->
getLatitude());
123 $this->tpl->setVariable(
"ZOOM", (
int) $this->
getZoom());
127 $this->tpl->setVariable(
"TYPE_CONTROL", $type_control);
131 $this->tpl->setVariable(
"NAV_CONTROL", $nav_control);
135 $this->tpl->setVariable(
"UPDATE_LISTENER", $update_listener);
139 $this->tpl->setVariable(
"LARGE_CONTROL", $large_map_control);
143 $this->tpl->setVariable(
"CENTRAL_MARKER", $central_marker);
145 return $this->tpl->get();
156 "tpl.google_map_user_list.html",
163 foreach ($this->user_marker as $user_id) {
166 $this->css_row = ($this->css_row !=
"tblrow1_mo")
169 if (
$user->getLatitude() != 0 &&
$user->getLongitude() != 0
170 &&
$user->getPref(
"public_location") ==
"y") {
171 $list_tpl->setCurrentBlock(
"item");
172 $list_tpl->setVariable(
"MARKER_CNT", $cnt);
173 $list_tpl->setVariable(
"MAP_ID", $this->
getMapId());
176 $list_tpl->setCurrentBlock(
"item_no_link");
178 $list_tpl->setVariable(
"CSS_ROW", $this->css_row);
179 $list_tpl->setVariable(
"TXT_USER",
$user->getLogin());
180 $list_tpl->setVariable(
182 $user->getPersonalPicturePath(
"xxsmall")
184 $list_tpl->parseCurrentBlock();
185 $list_tpl->touchBlock(
"row");
189 return $list_tpl->get();
An exception for terminatinating execution or to throw for unit testing.
User interface class for google maps.
getUserListHtml()
Get User List HTML (to be displayed besides the map)
User interface class for maps.
getEnableCentralMarker()
Get Enable Central Marker.
getLongitude()
Get Longitude.
getEnableTypeControl()
Get Use Map Type Control.
getEnableLargeMapControl()
Get Large Map Control.
getEnableNavigationControl()
Get Use Navigation Control.
getLatitude()
Get Latitude.
getEnableUpdateListener()
Get Activate Update Listener.
static _exists($a_id, $a_reference=false, $a_type=null)
checks if an object exists in object_data@access public
special template class to simplify handling of ITX/PEAR