Returns a Lootils\Geo\Location object for the current lat/lng.

@return GeoLocation
358421
public function getLocation()
    {
        if ($this->location === null) {
            $this->location = new GeoLocation($this->getLat(), $this->getLng());
        }

        return $this->location;
    }
1164904
public function getLongitude() : ?string 
    {
        if ( ! $this->hasLongitude()) {
            $this->setLongitude($this->getDefaultLongitude());
        }
        return $this->longitude;
    }
1322981
public static function getIPLocation(){
        //initialize the browser
        $adapter = new GuzzleHttpAdapter();
        
        //create geocoder
        $geocoder = new \Geocoder\Provider\FreeGeoIp($adapter);

        if (!isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
          $client_ip = $_SERVER['REMOTE_ADDR'];
        }
        else {
          $client_ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
        }

        return $geocoder->geocode($client_ip);
    }
684949
public function getLocation()
    {
        $country = $this->getCountry();
        $city = $this->getCity();

        return (empty($country)) ? $city : $country . ', ' . $city;
    }
285581
public LatLng getLatLng() {
    if (geometry == null) {
      return null;
    }
    return new LatLng(geometry.latitude(), geometry.longitude());
  }
493573
public LatLong getLocation() {
        if (location == null) {
            location = new LatLong((JSObject) (getJSObject().getMember("location")));
        }
        return location;
    }
597515
public function getCenter()
    {
        return new LatLng(
            ($this->getNorth() - $this->getSouth()),
            ($this->getWest() - $this->getEast())
        );
    }
806154
public function getLocation()
        {
            return isset($this->_data[self::PROFILE][self::LOCATION]) ? $this->_data[self::PROFILE][self::LOCATION] : null;
        }
720703
public function getLocationAction()
    {
        $id = $this
            ->request
            ->query
            ->get('id');

        return $this->createResponseObject(function () use ($id) {
            return $this->normalizeLocationData(
                $this
                    ->locationProvider
                    ->getLocation($id)
            );
        });
    }
1243645
public function searchLocation($lat, $lng, $distance = 1000)
    {
        return $this->_makeCall('locations/search', false, array('lat' => $lat, 'lng' => $lng, 'distance' => $distance));
    }
524633
private function getLocationConstraintMiddleware()
    {
        $region = $this->getRegion();
        return static function (callable $handler) use ($region) {
            return function (Command $command, $request = null) use ($handler, $region) {
                if ($command->getName() === 'CreateBucket') {
                    $locationConstraint = isset($command['CreateBucketConfiguration']['LocationConstraint'])
                        ? $command['CreateBucketConfiguration']['LocationConstraint']
                        : null;

                    if ($locationConstraint === 'us-east-1') {
                        unset($command['CreateBucketConfiguration']);
                    } elseif ('us-east-1' !== $region && empty($locationConstraint)) {
                        $command['CreateBucketConfiguration'] = ['LocationConstraint' => $region];
                    }
                }

                return $handler($command, $request);
            };
        };
    }
717408
def location(self):
        
        try:
            lat, lng = self["metadata"]["latitude"], self["metadata"]["longitude"]
        except KeyError:
            return None

        if not lat or not lng:
            return None

        return lat, lng
541726
public function get()
    {
        foreach ($this->_commands as $command) {
            $location = $this->_commandLocator->locate(basename($command));
            if ($location !== null) {
                return $location;
            }
        }

        return null;
    }
1352051
@JsonIgnore
    public GeoLocationRequest getGeoLocation() {
        val request = new GeoLocationRequest();
        request.setAccuracy(get("geoAccuracy"));
        request.setTimestamp(get("geoTimestamp"));
        request.setLongitude(get("geoLongitude"));
        request.setLatitude(get("geoLatitude"));
        return request;
    }
1188106
protected String getLocationDesc()
    {
        Location loc = getLocation();
        return (loc == null) ? null : loc.toString();
    }
1122242
public function getLocationByClassName($className)
    {
        if (is_object($className)) $className = get_class($className);
        if (isset($this->known[$className]['location'])) {
            return $this->known[$className]['location'];
        } else {
            return null;
        }
    }
334187
public function getGoogleMapAddressLanguage()
    {
        return $this->scopeConfig->getValue(
            self::XML_GOOGLE_MAP_ADDRESS_LANGUAGE,
            \Magento\Store\Model\ScopeInterface::SCOPE_STORE
        );
    }