public function GeofieldProximitySourceInterface::getProximity in Geofield 8
Get the calculated proximity.
Parameters
float $lat: The current point latitude.
float $lon: The current point longitude.
Return value
float The calculated proximity.
Throws
\Drupal\geofield\Exception\InvalidPointException; If the proximity cannot be created, due to incorrect point coordinates definition.
\Drupal\geofield\Exception\ProximityUnavailableException; If any other case the proximity value cannot be created correctly.
1 method overrides GeofieldProximitySourceInterface::getProximity()
- GeofieldProximitySourceBase::getProximity in src/
Plugin/ GeofieldProximitySourceBase.php - Get the calculated proximity.
File
- src/
Plugin/ GeofieldProximitySourceInterface.php, line 110
Class
- GeofieldProximitySourceInterface
- Defines an interface for Geofield Proximity Source plugins.
Namespace
Drupal\geofield\PluginCode
public function getProximity($lat, $lon);