Пример #1
0
 /**
  * Prepare loops
  */
 protected function prepareLoops()
 {
     $stepSize = (int) Configuration::ActivityView()->routePrecision()->value();
     $this->RouteLoop = new Route\Loop($this->Route);
     $this->RouteLoop->setStepSize($stepSize);
     if (!is_null($this->Trackdata) && $this->Route->num() == $this->Trackdata->num() && $this->Trackdata->has(Trackdata\Entity::TIME)) {
         $this->TrackdataLoop = new Trackdata\Loop($this->Trackdata);
         $this->TrackdataLoop->setStepSize($stepSize);
     }
 }
Пример #2
0
 /**
  * Display course
  */
 public function displayCourse()
 {
     $this->Context = new Context(Request::sendId(), Request::param('account'));
     if (!$this->activityIsValid() || !$this->Context->hasRoute() || !$this->Context->route()->hasPositionData()) {
         die('Don\'t do that!');
     }
     $Linker = new Linker($this->Context->activity());
     echo '<meta property="og:type" content="metadata">' . NL;
     echo '<link rel="origin" href="' . $Linker->publicUrl() . '">' . NL;
     $this->RouteLoop = new Model\Route\Loop($this->Context->route());
     $this->RouteLoop->setStepSize(self::STEP_SIZE);
     $this->TrackdataLoop = new Model\Trackdata\Loop($this->Context->trackdata());
     $this->TrackdataLoop->setStepSize(self::STEP_SIZE);
     do {
         $this->displayActivityDataPoint();
     } while ($this->RouteLoop->nextStep() && $this->TrackdataLoop->nextStep());
 }
Пример #3
0
 /**
  * Set internals
  * @param int|float $stepSize
  * @param enum $mode
  */
 protected function set($stepSize, $mode)
 {
     $this->StepSize = $stepSize;
     $this->Mode = $mode;
     $this->Loop->setStepSize($stepSize);
 }