You are here

public function IpGeoLocAPI::getVisitorLocation in IP Geolocation Views & Maps 8

Return the visitor's location as currently stored in the session.

Return value

array Lat/Lon array from SESSION

1 call to IpGeoLocAPI::getVisitorLocation()
IpGeoLocAPI::distance in src/Services/IpGeoLocAPI.php
Returns the distance (in meters) between two points on the earth's surface.

File

src/Services/IpGeoLocAPI.php, line 582

Class

IpGeoLocAPI
Class IpGeoAPI to interact with other modules.

Namespace

Drupal\ip_geoloc\Services

Code

public function getVisitorLocation() {
  $location = $this->ipGeolocSession
    ->getSessionValue('location');

  // @ TODO migrate drupal alter
  // drupal_alter('ip_geoloc_get_visitor_location', $location);
  return $location;
}