19declare(strict_types=1);
51 $this->longitude = $a_value;
61 $this->latitude = $a_value;
76 $this->zoom = max(1, abs((
int) $a_value));
84 return ($this->
getLongitude() == $a_adt->getLongitude() &&
85 $this->getLatitude() == $a_adt->getLatitude());
111 $valid = parent::isValid();
114 if ($long !==
null && $lat !==
null) {
116 if ($long < -180 || $long > 180) {
121 if ($lat < -90 || $lat > 90) {
139 return $this->
lng->txt(
"adt_error_longitude");
142 return $this->
lng->txt(
"adt_error_latitude");
145 return parent::translateErrorCode($a_code);
162 $obj =
new stdClass();
173 if (is_object($a_std)) {
ADT definition base class.
const ADT_VALIDATION_ERROR_LONGITUDE
setLongitude(?float $a_value=null)
setLatitude(?float $a_value=null)
exportStdClass()
Export value as stdClass.
isValidDefinition(ilADTDefinition $a_def)
Check if definition is valid for ADT.
getCheckSum()
Get unique checksum.
isLarger(ilADT $a_adt)
Check if given ADT is larger than self.
isNull()
Is currently null.
reset()
Init property defaults.
isSmaller(ilADT $a_adt)
Check if given ADT is smaller than self.
const ADT_VALIDATION_ERROR_LATITUDE
translateErrorCode(string $a_code)
@inheritcoc
importStdClass(?stdClass $a_std)
Import value from stdClass.
equals(ilADT $a_adt)
Check if given ADT equals self.
addValidationError(string $a_error_code)
getDefinition()
Get definition.