/**
  * Insert property html
  *
  */
 function insert(&$a_tpl)
 {
     global $lng;
     $lng->loadLanguageModule("gmaps");
     $tpl = new ilTemplate("tpl.prop_location.html", true, true, "Services/Form");
     $tpl->setVariable("POST_VAR", $this->getPostVar());
     $tpl->setVariable("TXT_ZOOM", $lng->txt("gmaps_zoom_level"));
     $tpl->setVariable("TXT_LATITUDE", $lng->txt("gmaps_latitude"));
     $tpl->setVariable("TXT_LONGITUDE", $lng->txt("gmaps_longitude"));
     $tpl->setVariable("TXT_ADDR", $lng->txt("address"));
     $tpl->setVariable("LOC_DESCRIPTION", $lng->txt("gmaps_std_location_desc"));
     $lat = is_numeric($this->getLatitude()) ? $this->getLatitude() : 0;
     $long = is_numeric($this->getLongitude()) ? $this->getLongitude() : 0;
     $tpl->setVariable("PROPERTY_VALUE_LAT", $lat);
     $tpl->setVariable("PROPERTY_VALUE_LONG", $long);
     for ($i = 0; $i <= 18; $i++) {
         $levels[$i] = $i;
     }
     $tpl->setVariable("ZOOM_SELECT", ilUtil::formSelect($this->getZoom(), $this->getPostVar() . "[zoom]", $levels, false, true, 0, "", array("id" => "map_" . $this->getPostVar() . "_zoom", "onchange" => "ilUpdateMap('" . "map_" . $this->getPostVar() . "');")));
     $tpl->setVariable("MAP_ID", "map_" . $this->getPostVar());
     $tpl->setVariable("ID", $this->getPostVar());
     $tpl->setVariable("TXT_LOOKUP", $lng->txt("gmaps_lookup_address"));
     $tpl->setVariable("TXT_ADDRESS", $this->getAddress());
     include_once "./Services/GoogleMaps/classes/class.ilGoogleMapGUI.php";
     $map_gui = new ilGoogleMapGUI();
     $map_gui->setMapId("map_" . $this->getPostVar());
     $map_gui->setLatitude($lat);
     $map_gui->setLongitude($long);
     $map_gui->setZoom($this->getZoom());
     $map_gui->setEnableTypeControl(true);
     $map_gui->setEnableLargeMapControl(true);
     $map_gui->setEnableUpdateListener(true);
     $map_gui->setEnableCentralMarker(true);
     $tpl->setVariable("MAP", $map_gui->getHtml());
     $a_tpl->setCurrentBlock("prop_generic");
     $a_tpl->setVariable("PROP_GENERIC", $tpl->get());
     $a_tpl->parseCurrentBlock();
 }