LocationContext

public class LocationContext


The location context is used to generate location-based search suggestions.

Summary

Nested types

The area restriction.

Geo type preferences to apply when generating search suggestions.

Geographical restrictions to apply when generating search suggestions.

A latitude/longitude pair.

Time restrictions to apply when generating search suggestions.

A time segment.

Public constructors

LocationContext(
    LocationContext.GeographicalRestrictions geographicalRestrictions,
    LocationContext.TimeRestrictions timeRestrictions,
    LocationContext.GeoTypeRestrictions geoTypeRestrictions
)

Public methods

LocationContext

Sets the geo type restrictions.

LocationContext

Sets the geographical restrictions.

LocationContext

Sets the time restrictions.

Public constructors

LocationContext

public LocationContext(
    LocationContext.GeographicalRestrictions geographicalRestrictions
)

LocationContext

public LocationContext(
    LocationContext.GeographicalRestrictions geographicalRestrictions,
    LocationContext.TimeRestrictions timeRestrictions,
    LocationContext.GeoTypeRestrictions geoTypeRestrictions
)

Public methods

setGeoTypeRestrictions

@CanIgnoreReturnValue
public LocationContext setGeoTypeRestrictions(
    LocationContext.GeoTypeRestrictions geoTypeRestrictions
)

Sets the geo type restrictions.

Parameters
LocationContext.GeoTypeRestrictions geoTypeRestrictions

the geo type restrictions.

Returns
LocationContext

the location context.

setGeographicalRestrictions

@CanIgnoreReturnValue
public LocationContext setGeographicalRestrictions(
    LocationContext.GeographicalRestrictions geographicalRestrictions
)

Sets the geographical restrictions.

Parameters
LocationContext.GeographicalRestrictions geographicalRestrictions

the geographical restrictions.

Returns
LocationContext

the location context.

setTimeRestrictions

@CanIgnoreReturnValue
public LocationContext setTimeRestrictions(LocationContext.TimeRestrictions timeRestrictions)

Sets the time restrictions.

Parameters
LocationContext.TimeRestrictions timeRestrictions

the time restrictions.

Returns
LocationContext

the location context.