You are here

public function GeofieldProximitySourceBase::isEmptyLocation in Geofield 8

Check if Location is empty.

Parameters

float $lat: The latitude value.

float $lon: The longitude value.

Return value

bool The bool result.

Overrides GeofieldProximitySourceInterface::isEmptyLocation

2 calls to GeofieldProximitySourceBase::isEmptyLocation()
GeofieldProximitySourceBase::getHaversineOptions in src/Plugin/GeofieldProximitySourceBase.php
Gets the haversine options.
GeofieldProximitySourceBase::getProximity in src/Plugin/GeofieldProximitySourceBase.php
Get the calculated proximity.

File

src/Plugin/GeofieldProximitySourceBase.php, line 51

Class

GeofieldProximitySourceBase
Base class for Geofield Proximity Source plugins.

Namespace

Drupal\geofield\Plugin

Code

public function isEmptyLocation($lat, $lon) {
  return empty($lat) && empty($lon);
}