Ejemplo n.º 1
0
 /**
  * Constructor.
  * 
  * @since 0.6
  * 
  * @param SMWDataItem $dataItem
  * @param string $comparator
  * @param string $radius
  */
 public function __construct(SMWDataItem $dataItem, $comparator, $radius)
 {
     parent::__construct($dataItem, $comparator);
     // Only if the MapsGeoFunctions class is  loaded, we can create the bounding box.
     if (self::geoFunctionsAreAvailable()) {
         $this->calculateBounds($dataItem, $radius);
     }
 }
 /**
  * @param SMWDataItem $areaCenter
  * @param string $comparator
  * @param string $radius
  * @param SMWDIProperty $property
  *
  * @throws InvalidArgumentException
  */
 public function __construct(SMWDataItem $areaCenter, $comparator, $radius, SMWDIProperty $property = null)
 {
     if (!$areaCenter instanceof SMWDIGeoCoord) {
         throw new InvalidArgumentException('$areaCenter needs to be a SMWDIGeoCoord');
     }
     parent::__construct($areaCenter, $property, $comparator);
     $this->radius = MapsDistanceParser::parseDistance($radius);
     $this->center = $areaCenter;
     $this->bounds = $this->getBoundingBox();
 }
 /**
  * Constructor.
  * 
  * @since 0.8
  * 
  * @param SMWDataItem $dataItem
  */
 public function __construct(SMWDataItem $dataItem, $comparator)
 {
     parent::__construct($dataItem, $comparator);
 }