3declare(strict_types=1);
35 $this->longitude = $a_value;
45 $this->latitude = $a_value;
60 $this->zoom = max(1, abs((
int) $a_value));
68 return ($this->
getLongitude() == $a_adt->getLongitude() &&
69 $this->getLatitude() == $a_adt->getLatitude());
95 $valid = parent::isValid();
98 if ($long !==
null && $lat !==
null) {
100 if ($long < -180 || $long > 180) {
105 if ($lat < -90 || $lat > 90) {
123 return $this->
lng->txt(
"adt_error_longitude");
126 return $this->
lng->txt(
"adt_error_latitude");
129 return parent::translateErrorCode($a_code);
146 $obj =
new stdClass();
157 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.