ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups 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.
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 getDefaultSettings ()
 Get default longitude, latitude and zoom.
static getMapGUI ()
 Get an instance of the GUI class.
static getAvailableMapTypes ()
 Get a dict { $id => $name } for available maps services.

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

static ilMapUtil::getAvailableMapTypes ( )
static

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

Returns
array

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

References $lng.

Referenced by ilObjExternalToolsSettingsGUI\editMapsObject().

{
global $lng;
$lng->loadLanguageModule("maps");
return array( "openlayers" => $lng->txt("maps_open_layers_maps")
, "googlemaps" => $lng->txt("maps_google_maps")
);
}

+ Here is the caller graph for this function:

static ilMapUtil::getDefaultSettings ( )
static

Get default longitude, latitude and zoom.

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

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

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

{
return array(
"longitude" => self::settings()->get("std_longitude"),
"latitude" => self::settings()->get("std_latitude"),
"zoom" => self::settings()->get("std_zoom"));
}

+ Here is the caller graph for this function:

static ilMapUtil::getMapGUI ( )
static

Get an instance of the GUI class.

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

References getType().

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

{
$type = self::getType();
switch ($type) {
case "googlemaps":
require_once("Services/Maps/classes/class.ilGoogleMapGUI.php");
return new ilGoogleMapGUI();
case "openlayers":
require_once("Services/Maps/classes/class.ilOpenLayersMapGUI.php");
return new ilOpenLayersMapGUI();
default:
require_once("Services/Maps/classes/class.ilGoogleMapGUI.php");
return new ilGoogleMapGUI();
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilMapUtil::getStdLatitude ( )
static

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

References settings().

Referenced by ilObjExternalToolsSettingsGUI\editMapsObject().

{
return self::settings()->get("std_latitude");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilMapUtil::getStdLongitude ( )
static

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

References settings().

Referenced by ilObjExternalToolsSettingsGUI\editMapsObject().

{
return self::settings()->get("std_longitude");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilMapUtil::getStdZoom ( )
static

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

References settings().

Referenced by ilObjExternalToolsSettingsGUI\editMapsObject().

{
return self::settings()->get("std_zoom");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilMapUtil::getType ( )
static

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

References settings().

Referenced by ilObjExternalToolsSettingsGUI\editMapsObject(), and getMapGUI().

{
return self::settings()->get("type");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilMapUtil::isActivated ( )
static
static ilMapUtil::setActivated (   $a_activated)
static

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

References settings().

Referenced by ilObjExternalToolsSettingsGUI\saveMapsObject().

{
self::settings()->set("enable", $a_activated?"1":"0");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilMapUtil::setStdLatitude (   $a_lat)
static

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

References settings().

Referenced by ilObjExternalToolsSettingsGUI\saveMapsObject().

{
self::settings()->set("std_latitude", $a_lat);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilMapUtil::setStdLongitude (   $a_lon)
static

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

References settings().

Referenced by ilObjExternalToolsSettingsGUI\saveMapsObject().

{
self::settings()->set("std_longitude", $a_lon);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilMapUtil::setStdZoom (   $a_zoom)
static

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

References settings().

Referenced by ilObjExternalToolsSettingsGUI\saveMapsObject().

{
self::settings()->set("std_zoom", $a_zoom);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilMapUtil::settings ( )
static

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

References $_settings.

Referenced by getStdLatitude(), getStdLongitude(), getStdZoom(), getType(), isActivated(), setActivated(), setStdLatitude(), setStdLongitude(), setStdZoom(), and setType().

{
if (self::$_settings === null) {
self::$_settings = new ilSetting("maps");
}
}

+ Here is the caller graph for this function:

static ilMapUtil::setType (   $a_type)
static

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

References settings().

Referenced by ilObjExternalToolsSettingsGUI\saveMapsObject().

{
self::settings()->set("type", $a_type);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Field Documentation

ilMapUtil::$_settings = null
static

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

Referenced by settings().


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