3 declare(strict_types=1);
    21         $this->tile_server = 
"";
    22         $this->geolocation_server = 
"";
    32         $this->tile_server = $tile;
    43         $this->geolocation_server = $geolocation;
    49         $this->tpl->addCss(
"node_modules/ol/ol.css");
    50         $this->tpl->addCss(
"Services/Maps/css/service_openlayers.css");
    51         $this->tpl->addJavaScript(
"Services/Maps/js/dist/ServiceOpenLayers.js");
    54     public function getHtml(
bool $inline_js = 
false): string
    57         $this->
lng->loadLanguageModule(
"maps");
    60             "tpl.openlayers_map.html",
    67             "tpl.openlayers_map.js",
    75         foreach ($this->user_marker as $user_id) {
    78                 if ($user->getLatitude() != 0 && $user->getLongitude() != 0 &&
    79                     $user->getPref(
"public_location") == 
"y") {
    80                     $js_tpl->setCurrentBlock(
"user_marker");
    85                     $js_tpl->setVariable(
"CNT", $cnt);
    87                     $js_tpl->setVariable(
"ULAT", htmlspecialchars($user->getLatitude()));
    88                     $js_tpl->setVariable(
"ULONG", htmlspecialchars($user->getLongitude()));
    89                     $info = htmlspecialchars($user->getFirstName() . 
" " . $user->getLastName());
    91                     if ($user->getPref(
"public_institution") == 
"y") {
    92                         $info .= $delim . htmlspecialchars($user->getInstitution());
    95                     if ($user->getPref(
"public_department") == 
"y") {
    96                         $info .= $delim . htmlspecialchars($user->getDepartment());
    99                     if ($user->getPref(
"public_street") == 
"y") {
   100                         $info .= $delim . htmlspecialchars($user->getStreet());
   102                     if ($user->getPref(
"public_zip") == 
"y") {
   103                         $info .= $delim . htmlspecialchars($user->getZipcode());
   106                     if ($user->getPref(
"public_city") == 
"y") {
   107                         $info .= $delim . htmlspecialchars($user->getCity());
   110                     if ($user->getPref(
"public_country") == 
"y") {
   111                         $info .= $delim . htmlspecialchars($user->getCountry());
   113                     $js_tpl->setVariable(
   117                     $js_tpl->setVariable(
   119                         $user->getPersonalPicturePath(
"xsmall")
   121                     $js_tpl->parseCurrentBlock();
   127         $html_tpl->setVariable(
"MAP_ID", $this->
getMapId());
   128         $html_tpl->setVariable(
"WIDTH", $this->
getWidth());
   129         $html_tpl->setVariable(
"HEIGHT", $this->
getHeight());
   131         $js_tpl->setVariable(
"MAP_ID", $this->
getMapId());
   134         $js_tpl->setVariable(
"ZOOM", (
int) $this->
getZoom());
   139         $js_tpl->setVariable(
"NAV_CONTROL", $nav_control);
   147         $js_tpl->setVariable(
"REPLACE_MARKER", $replace_marker);
   150         $tile_servers = explode(
" ", $tile_servers);
   151         array_walk($tile_servers, 
function (&$string) {
   152             $string = 
'"' . $string . 
'"';
   154         $tile_servers = 
'[' . implode(
', ', $tile_servers) . 
']';
   156         $js_tpl->setVariable(
"TILES", $tile_servers);
   158         $js_tpl->setVariable(
"INVALID_ADDRESS_STRING", $this->
lng->txt(
"invalid_address"));
   160         $out = $html_tpl->get();
   162             $this->tpl->addOnLoadCode($js_tpl->get());
   164             $out .= 
'<script>' .$js_tpl->get() . 
'</script>';
   175             "tpl.openlayers_map_user_list.html",
   182         foreach ($this->user_marker as $user_id) {
   185                 $this->css_row = ($this->css_row != 
"tblrow1_mo")
   188                 if ($user->getLatitude() != 0 && $user->getLongitude() != 0
   189                     && $user->getPref(
"public_location") == 
"y") {
   190                     $list_tpl->setCurrentBlock(
"item");
   191                     $list_tpl->setVariable(
"MARKER_CNT", $cnt);
   192                     $list_tpl->setVariable(
"MAP_ID", $this->
getMapId());
   195                     $list_tpl->setCurrentBlock(
"item_no_link");
   197                 $list_tpl->setVariable(
"CSS_ROW", $this->css_row);
   198                 $list_tpl->setVariable(
"TXT_USER", $user->getLogin());
   199                 $list_tpl->setVariable(
   201                     $user->getPersonalPicturePath(
"xxsmall")
   203                 $list_tpl->parseCurrentBlock();
   204                 $list_tpl->touchBlock(
"row");
   208         return $list_tpl->get();
 
getUserListHtml()
Get User List HTML (to be displayed besides the map) 
 
getEnableUpdateListener()
 
getEnableNavigationControl()
 
static _exists(int $id, bool $reference=false, ?string $type=null)
checks if an object exists in object_data 
 
string $geolocation_server
 
setTileServers(string $tile)
 
getHtml(bool $inline_js=false)
 
User interface class for maps. 
 
User interface class for OpenLayers maps. 
 
setGeolocationServer(?string $geolocation)