add InfoWindow data methods for mapping

This commit is contained in:
Ryan Prather 2025-01-10 14:44:59 +00:00
parent 6260b13df0
commit e1e4c12801

View File

@ -191,4 +191,22 @@ class CaseItinerary
}
return $points;
}
public function originInfoWindow(): string
{
return <<<EOL
{$this->originLocation->getName()}<br/>
<a href='http://maps.google.com/?q={$this->originLocation->getLat()},{$this->originLocation->getLon()}'>{$this->originLocation->getFormattedAddress()}</a><br/>
{$this->departure->format("g:i a")}
EOL;
}
public function destinationInfoWindow(): string
{
return <<<EOL
{$this->destLocation->getName()}<br/>
<a href='http://maps.google.com/?q={$this->destLocation->getLat()},{$this->destLocation->getLon()}'>{$this->destLocation->getFormattedAddress()}</a><br/>
{$this->arrival->format("g:i a")}
EOL;
}
}