@Override
    public GeoLocationResponse locate(final String clientIp, final GeoLocationRequest location) throws Throwable {
        LOGGER.trace("Attempting to find geolocation for [{}]", clientIp);
        val loc = locate(clientIp);

        if (loc == null && location != null) {
            LOGGER.trace("Attempting to find geolocation for [{}]", location);
            if (StringUtils.isNotBlank(location.getLatitude()) && StringUtils.isNotBlank(location.getLongitude())) {
                return locate(Double.valueOf(location.getLatitude()), Double.valueOf(location.getLongitude()));
            }
        }
        return loc;
    }
This is {@link AbstractGeoLocationService}.

@author Misagh Moayyed
@since 5.0.0
support/cas-server-support-geolocation/src/main/java/org/apereo/cas/support/geo/AbstractGeoLocationService.java