33require_once(
"Services/Maps/classes/class.ilMapGUI.php");
 
   39                parent::__construct();
 
   49                $this->tpl = 
new ilTemplate(
"tpl.openlayers_map.html",
 
   50                        true, 
true, 
"Services/Maps");
 
   53                $lng->loadLanguageModule(
"maps");
 
   54                $tpl->addJavaScript(
"Services/Maps/js/OpenLayers.js");
 
   55                $tpl->addJavaScript(
"Services/Maps/js/ServiceOpenLayers.js");
 
   59                foreach($this->user_marker as $user_id)
 
   64                                if ($user->getLatitude() != 0 && $user->getLongitude() != 0 &&
 
   65                                        $user->getPref(
"public_location") == 
"y")
 
   67                                        $this->tpl->setCurrentBlock(
"user_marker");
 
   68                                        $this->tpl->setVariable(
"UMAP_ID",
 
   70                                        $this->tpl->setVariable(
"CNT", $cnt);
 
   72                                        $this->tpl->setVariable(
"ULAT", htmlspecialchars($user->getLatitude()));
 
   73                                        $this->tpl->setVariable(
"ULONG", htmlspecialchars($user->getLongitude()));
 
   74                                        $info = htmlspecialchars($user->getFirstName().
" ".$user->getLastName());
 
   76                                        if ($user->getPref(
"public_institution") == 
"y")
 
   78                                                $info.= $delim.htmlspecialchars($user->getInstitution());
 
   81                                        if ($user->getPref(
"public_department") == 
"y")
 
   83                                                $info.= $delim.htmlspecialchars($user->getDepartment());
 
   86                                        if ($user->getPref(
"public_street") == 
"y")
 
   88                                                $info.= $delim.htmlspecialchars($user->getStreet());
 
   90                                        if ($user->getPref(
"public_zip") == 
"y")
 
   92                                                $info.= $delim.htmlspecialchars($user->getZipcode());
 
   95                                        if ($user->getPref(
"public_city") == 
"y")
 
   97                                                $info.= $delim.htmlspecialchars($user->getCity());
 
  100                                        if ($user->getPref(
"public_country") == 
"y")
 
  102                                                $info.= $delim.htmlspecialchars($user->getCountry());
 
  104                                        $this->tpl->setVariable(
"USER_INFO",
 
  106                                        $this->tpl->setVariable(
"IMG_USER",
 
  107                                                $user->getPersonalPicturePath(
"xsmall"));
 
  108                                        $this->tpl->parseCurrentBlock();
 
  114                $this->tpl->setVariable(
"MAP_ID", $this->
getMapId());
 
  115                $this->tpl->setVariable(
"WIDTH", $this->
getWidth());
 
  116                $this->tpl->setVariable(
"HEIGHT", $this->
getHeight());
 
  117                $this->tpl->setVariable(
"LAT", $this->
getLatitude());
 
  119                $this->tpl->setVariable(
"ZOOM", (
int) $this->
getZoom());
 
  123                $this->tpl->setVariable(
"NAV_CONTROL", $nav_control);
 
  127                $this->tpl->setVariable(
"CENTRAL_MARKER", $central_marker);
 
  131                $this->tpl->setVariable(
"REPLACE_MARKER", $replace_marker);
 
  132                $this->tpl->setVariable(
"INVALID_ADDRESS_STRING", 
$lng->txt(
"invalid_address"));
 
  134                return $this->tpl->get();
 
  142                $list_tpl = 
new ilTemplate(
"tpl.openlayers_map_user_list.html",
 
  143                        true, 
true, 
"Services/Maps");
 
  146                foreach($this->user_marker as $user_id)
 
  151                                $this->css_row = ($this->css_row != 
"tblrow1_mo")
 
  154                                if ($user->getLatitude() != 0 && $user->getLongitude() != 0
 
  155                                        && $user->getPref(
"public_location") == 
"y")
 
  157                                        $list_tpl->setCurrentBlock(
"item");
 
  158                                        $list_tpl->setVariable(
"MARKER_CNT", $cnt);
 
  159                                        $list_tpl->setVariable(
"MAP_ID", $this->
getMapId());
 
  164                                        $list_tpl->setCurrentBlock(
"item_no_link");
 
  166                                $list_tpl->setVariable(
"CSS_ROW", $this->css_row);
 
  167                                $list_tpl->setVariable(
"TXT_USER", $user->getLogin());
 
  168                                $list_tpl->setVariable(
"IMG_USER",
 
  169                                        $user->getPersonalPicturePath(
"xxsmall"));
 
  170                                $list_tpl->parseCurrentBlock();
 
  171                                $list_tpl->touchBlock(
"row");
 
  175                return $list_tpl->get();
 
User interface class for maps.
getEnableCentralMarker()
Get Enable Central Marker.
getLongitude()
Get Longitude.
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
User interface class for OpenLayers maps.
getUserListHtml()
Get User List HTML (to be displayed besides the map)
special template class to simplify handling of ITX/PEAR