46 parent::__construct($a_title, $a_postvar);
57 $this->latitude = $a_latitude;
79 $this->longitude = $a_longitude;
99 $this->zoom = $a_zoom;
119 $this->address = $a_address;
160 $this->
setAlert($lng->txt(
"msg_input_is_required"));
173 global
$lng, $rbacsystem;
175 $lng->loadLanguageModule(
"maps");
176 $tpl =
new ilTemplate(
"tpl.prop_location.html",
true,
true,
"Services/Form");
178 $tpl->setVariable(
"TXT_ZOOM", $lng->txt(
"maps_zoom_level"));
179 $tpl->setVariable(
"TXT_LATITUDE",
$lng->txt(
"maps_latitude"));
180 $tpl->setVariable(
"TXT_LONGITUDE",
$lng->txt(
"maps_longitude"));
181 $tpl->setVariable(
"LOC_DESCRIPTION",
$lng->txt(
"maps_std_location_desc"));
189 $tpl->setVariable(
"PROPERTY_VALUE_LAT", $lat);
190 $tpl->setVariable(
"PROPERTY_VALUE_LONG", $long);
191 for($i = 0; $i <= 18; $i++)
196 $map_id =
"map_".md5(uniqid());
198 $tpl->setVariable(
"ZOOM_SELECT",
200 $levels,
false,
true, 0,
"", array(
"id" => $map_id.
"_zoom",
201 "onchange" =>
"ilUpdateMap('".$map_id.
"');")));
202 $tpl->setVariable(
"MAP_ID", $map_id);
209 $tpl->setVariable(
"TXT_ADDR", $lng->txt(
"address"));
210 $tpl->setVariable(
"TXT_LOOKUP",
$lng->txt(
"maps_lookup_address"));
212 $tpl->setVariable(
"MAP_ID_ADDR", $map_id);
215 if($rbacsystem->checkAccess(
"visible", SYSTEM_FOLDER_ID)) {
216 $tpl->setVariable(
"TEXT",
$lng->txt(
"configure_geolocation"));
220 include_once(
"./Services/Maps/classes/class.ilMapUtil.php");
222 $map_gui->setMapId($map_id)
224 ->setLongitude($long)
226 ->setEnableTypeControl(
true)
227 ->setEnableLargeMapControl(
true)
228 ->setEnableUpdateListener(
true)
229 ->setEnableCentralMarker(
true);
231 $tpl->setVariable(
"MAP", $map_gui->getHtml());
233 $a_tpl->setCurrentBlock(
"prop_generic");
234 $a_tpl->setVariable(
"PROP_GENERIC",
$tpl->get());
235 $a_tpl->parseCurrentBlock();
243 include_once(
"./Services/Maps/classes/class.ilMapUtil.php");
An exception for terminatinating execution or to throw for unit testing.
static getStdGeolocationServer()
Returns the reverse geolocation server to be used in the installation.
static getMapGUI()
Get an instance of the GUI class.
special template class to simplify handling of ITX/PEAR
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static formSelect($selected, $varname, $options, $multiple=false, $direct_text=false, $size="0", $style_class="", $attribs="", $disabled=false)
Builds a select form field with options and shows the selected option first.