ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
All Data Structures Namespaces Files Functions Variables Modules Pages
ilMapUtil Class Reference

Map Utility Class. More...

+ Collaboration diagram for ilMapUtil:

Static Public Member Functions

static settings ()
 
static isActivated ()
 Checks whether Map feature is activated. More...
 
static setActivated ($a_activated)
 
static setType ($a_type)
 
static getType ()
 
static setStdLatitude ($a_lat)
 
static getStdLatitude ()
 
static setStdLongitude ($a_lon)
 
static getStdLongitude ()
 
static setStdZoom ($a_zoom)
 
static getStdZoom ()
 
static setApiKey ($a_api_key)
 
static getApiKey ()
 
static getDefaultSettings ()
 Get default longitude, latitude and zoom. More...
 
static getMapGUI ()
 Get an instance of the GUI class. More...
 
static getAvailableMapTypes ()
 Get a dict { $id => $name } for available maps services. More...
 

Static Public Attributes

static $_settings = null
 

Detailed Description

Map Utility Class.

Author
Richard Klees richa.nosp@m.rd.k.nosp@m.lees@.nosp@m.conc.nosp@m.epts-.nosp@m.and-.nosp@m.train.nosp@m.ing..nosp@m.de
Version
$Id$

Definition at line 32 of file class.ilMapUtil.php.

Member Function Documentation

◆ getApiKey()

static ilMapUtil::getApiKey ( )
static

Definition at line 110 of file class.ilMapUtil.php.

Referenced by ilObjExternalToolsSettingsGUI\editMapsObject(), and ilGoogleMapGUI\getHtml().

111  {
112  return self::settings()->get("api_key");
113  }
+ Here is the caller graph for this function:

◆ getAvailableMapTypes()

static ilMapUtil::getAvailableMapTypes ( )
static

Get a dict { $id => $name } for available maps services.

Returns
array

Definition at line 152 of file class.ilMapUtil.php.

References $lng.

Referenced by ilObjExternalToolsSettingsGUI\editMapsObject().

153  {
154  global $lng;
155  $lng->loadLanguageModule("maps");
156  return array( "openlayers" => $lng->txt("maps_open_layers_maps")
157  , "googlemaps" => $lng->txt("maps_google_maps")
158  );
159  }
global $lng
Definition: privfeed.php:40
+ Here is the caller graph for this function:

◆ getDefaultSettings()

static ilMapUtil::getDefaultSettings ( )
static

Get default longitude, latitude and zoom.

Returns
array array("latitude", "longitude", "zoom")

Definition at line 120 of file class.ilMapUtil.php.

Referenced by ilPersonalProfileGUI\addLocationToForm(), ilADTLocationFormBridge\addToForm(), ilADTLocationSearchBridgeSingle\addToForm(), ilObjGroupGUI\editMapSettingsObject(), and ilObjCourseGUI\editMapSettingsObject().

121  {
122  return array(
123  "longitude" => self::settings()->get("std_longitude"),
124  "latitude" => self::settings()->get("std_latitude"),
125  "zoom" => self::settings()->get("std_zoom"));
126  }
+ Here is the caller graph for this function:

◆ getMapGUI()

static ilMapUtil::getMapGUI ( )
static

Get an instance of the GUI class.

Definition at line 131 of file class.ilMapUtil.php.

Referenced by ilPublicUserProfileGUI\getEmbeddable(), ilADTLocationPresentationBridge\getHTML(), ilLocationInputGUI\insert(), ilObjGroupGUI\membersMapObject(), ilObjCourseGUI\membersMapObject(), and ilPCMap\modifyPageContentPostXsl().

132  {
133  $type = self::getType();
134  switch ($type) {
135  case "googlemaps":
136  require_once("Services/Maps/classes/class.ilGoogleMapGUI.php");
137  return new ilGoogleMapGUI();
138  case "openlayers":
139  require_once("Services/Maps/classes/class.ilOpenLayersMapGUI.php");
140  return new ilOpenLayersMapGUI();
141  default:
142  require_once("Services/Maps/classes/class.ilGoogleMapGUI.php");
143  return new ilGoogleMapGUI();
144  }
145  }
User interface class for google maps.
User interface class for OpenLayers maps.
+ Here is the caller graph for this function:

◆ getStdLatitude()

static ilMapUtil::getStdLatitude ( )
static

Definition at line 80 of file class.ilMapUtil.php.

Referenced by ilObjExternalToolsSettingsGUI\editMapsObject().

81  {
82  return self::settings()->get("std_latitude");
83  }
+ Here is the caller graph for this function:

◆ getStdLongitude()

static ilMapUtil::getStdLongitude ( )
static

Definition at line 90 of file class.ilMapUtil.php.

Referenced by ilObjExternalToolsSettingsGUI\editMapsObject().

91  {
92  return self::settings()->get("std_longitude");
93  }
+ Here is the caller graph for this function:

◆ getStdZoom()

static ilMapUtil::getStdZoom ( )
static

Definition at line 100 of file class.ilMapUtil.php.

Referenced by ilObjExternalToolsSettingsGUI\editMapsObject().

101  {
102  return self::settings()->get("std_zoom");
103  }
+ Here is the caller graph for this function:

◆ getType()

static ilMapUtil::getType ( )
static

Definition at line 71 of file class.ilMapUtil.php.

Referenced by ilObjExternalToolsSettingsGUI\editMapsObject().

71  {
72  return self::settings()->get("type");
73  }
+ Here is the caller graph for this function:

◆ isActivated()

static ilMapUtil::isActivated ( )
static

◆ setActivated()

static ilMapUtil::setActivated (   $a_activated)
static

Definition at line 61 of file class.ilMapUtil.php.

Referenced by ilObjExternalToolsSettingsGUI\saveMapsObject().

62  {
63  self::settings()->set("enable", $a_activated?"1":"0");
64  }
+ Here is the caller graph for this function:

◆ setApiKey()

static ilMapUtil::setApiKey (   $a_api_key)
static

Definition at line 105 of file class.ilMapUtil.php.

Referenced by ilObjExternalToolsSettingsGUI\saveMapsObject().

106  {
107  self::settings()->set("api_key", $a_api_key);
108  }
+ Here is the caller graph for this function:

◆ setStdLatitude()

static ilMapUtil::setStdLatitude (   $a_lat)
static

Definition at line 75 of file class.ilMapUtil.php.

Referenced by ilObjExternalToolsSettingsGUI\saveMapsObject().

76  {
77  self::settings()->set("std_latitude", $a_lat);
78  }
+ Here is the caller graph for this function:

◆ setStdLongitude()

static ilMapUtil::setStdLongitude (   $a_lon)
static

Definition at line 85 of file class.ilMapUtil.php.

Referenced by ilObjExternalToolsSettingsGUI\saveMapsObject().

86  {
87  self::settings()->set("std_longitude", $a_lon);
88  }
+ Here is the caller graph for this function:

◆ setStdZoom()

static ilMapUtil::setStdZoom (   $a_zoom)
static

Definition at line 95 of file class.ilMapUtil.php.

Referenced by ilObjExternalToolsSettingsGUI\saveMapsObject().

96  {
97  self::settings()->set("std_zoom", $a_zoom);
98  }
+ Here is the caller graph for this function:

◆ settings()

static ilMapUtil::settings ( )
static

Definition at line 38 of file class.ilMapUtil.php.

39  {
40  if (self::$_settings === null) {
41  self::$_settings = new ilSetting("maps");
42  }
43  return self::$_settings;
44  }
ILIAS Setting Class.

◆ setType()

static ilMapUtil::setType (   $a_type)
static

Definition at line 66 of file class.ilMapUtil.php.

Referenced by ilObjExternalToolsSettingsGUI\saveMapsObject().

67  {
68  self::settings()->set("type", $a_type);
69  }
+ Here is the caller graph for this function:

Field Documentation

◆ $_settings

ilMapUtil::$_settings = null
static

Definition at line 34 of file class.ilMapUtil.php.


The documentation for this class was generated from the following file: