37 if ($a_value !== null) {
38 $a_value = (float) $a_value;
40 $this->longitude = $a_value;
50 if ($a_value !== null) {
51 $a_value = (float) $a_value;
53 $this->latitude = $a_value;
68 $this->zoom = max(1, abs((
int) $a_value));
77 return ($this->
getLongitude() == $a_adt->getLongitude() &&
105 $valid = parent::isValid();
111 if ($long !== null && $lat !== null) {
113 if ($long < -180 || $long > 180) {
118 if ($lat < -90 || $lat > 90) {
139 case self::ADT_VALIDATION_ERROR_LONGITUDE:
140 return $lng->txt(
"adt_error_longitude");
142 case self::ADT_VALIDATION_ERROR_LATITUDE:
143 return $lng->txt(
"adt_error_latitude");
147 return parent::translateErrorCode($a_code);
isValidDefinition(ilADTDefinition $a_def)
addValidationError($a_error_code)
Add validation error code.
const ADT_VALIDATION_ERROR_LATITUDE
translateErrorCode($a_code)
const ADT_VALIDATION_ERROR_LONGITUDE
setLongitude($a_value=null)
setLatitude($a_value=null)
ADT definition base class.
getDefinition()
Get definition.