53 $this->lng =
$DIC->language();
54 $this->rbacsystem =
$DIC->rbac()->system();
66 $this->latitude = $a_latitude;
88 $this->longitude = $a_longitude;
108 $this->zoom = $a_zoom;
128 $this->address = $a_address;
184 $lng->loadLanguageModule(
"maps");
185 $tpl =
new ilTemplate(
"tpl.prop_location.html",
true,
true,
"Services/Form");
187 $tpl->setVariable(
"TXT_ZOOM",
$lng->txt(
"maps_zoom_level"));
188 $tpl->setVariable(
"TXT_LATITUDE",
$lng->txt(
"maps_latitude"));
189 $tpl->setVariable(
"TXT_LONGITUDE",
$lng->txt(
"maps_longitude"));
190 $tpl->setVariable(
"LOC_DESCRIPTION",
$lng->txt(
"maps_std_location_desc"));
198 $tpl->setVariable(
"PROPERTY_VALUE_LAT", $lat);
199 $tpl->setVariable(
"PROPERTY_VALUE_LONG", $long);
200 for (
$i = 0;
$i <= 18;
$i++) {
204 $map_id =
"map_" . md5(uniqid());
216 array(
"id" => $map_id .
"_zoom",
217 "onchange" =>
"ilUpdateMap('" . $map_id .
"');")
220 $tpl->setVariable(
"MAP_ID", $map_id);
227 $tpl->setVariable(
"TXT_ADDR",
$lng->txt(
"address"));
228 $tpl->setVariable(
"TXT_LOOKUP",
$lng->txt(
"maps_lookup_address"));
230 $tpl->setVariable(
"MAP_ID_ADDR", $map_id);
233 if (
$rbacsystem->checkAccess(
"visible", SYSTEM_FOLDER_ID)) {
234 $tpl->setVariable(
"TEXT",
$lng->txt(
"configure_geolocation"));
238 include_once(
"./Services/Maps/classes/class.ilMapUtil.php");
240 $map_gui->setMapId($map_id)
242 ->setLongitude($long)
244 ->setEnableTypeControl(
true)
245 ->setEnableLargeMapControl(
true)
246 ->setEnableUpdateListener(
true)
247 ->setEnableCentralMarker(
true);
249 $tpl->setVariable(
"MAP", $map_gui->getHtml());
251 $a_tpl->setCurrentBlock(
"prop_generic");
252 $a_tpl->setVariable(
"PROP_GENERIC",
$tpl->get());
253 $a_tpl->parseCurrentBlock();
262 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.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl