-
public final class GeoThis object encapsulates various methods for specifying a geographic location. When subordinate to a Device object, it indicates the location of the device which can also be interpreted as the user’s current location. When subordinate to a User object, it indicates the location of the user’s home base (i.e., not necessarily their current location). The lat/lon attributes should only be passed if they conform to the accuracy depicted in the type attribute. For example, the centroid of a geographic region such as postal code should not be passed.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enumGeo.GeoTypepublic enumGeo.IPLocationService
-
Field Summary
Fields Modifier and Type Field Description private Floatlatitudeprivate Floatlongitudeprivate Geo.GeoTypetypeprivate Integeraccuracyprivate IntegerlastFixprivate Geo.IPLocationServiceipServiceprivate Stringcountryprivate Stringregionprivate StringregionFIPS104private Stringmetroprivate Stringcityprivate Stringzipprivate IntegerlocalTimeprivate Objectextension
-
Constructor Summary
Constructors Constructor Description Geo()
-
Method Summary
Modifier and Type Method Description final FloatgetLatitude()Latitude from -90.0 to +90.0, where negative is south. final UnitsetLatitude(@SerializedName(value = lat) Float latitude)Latitude from -90.0 to +90.0, where negative is south. final FloatgetLongitude()Longitude from -180.0 to +180.0, where negative is west. final UnitsetLongitude(@SerializedName(value = lon) Float longitude)Longitude from -180.0 to +180.0, where negative is west. final Geo.GeoTypegetType()Source of location data; recommended when passing lat/lon. final UnitsetType(@SerializedName(value = type) Geo.GeoType type)Source of location data; recommended when passing lat/lon. final IntegergetAccuracy()Estimated location accuracy in meters; recommended when lat/lon are specified and derived from a device’s location services (i.e., type = 1). final UnitsetAccuracy(@SerializedName(value = accuracy) Integer accuracy)Estimated location accuracy in meters; recommended when lat/lon are specified and derived from a device’s location services (i.e., type = 1). final IntegergetLastFix()Number of seconds since this geolocation fix was established. final UnitsetLastFix(@SerializedName(value = lastfix) Integer lastFix)Number of seconds since this geolocation fix was established. final Geo.IPLocationServicegetIpService()Service or provider used to determine geolocation from IP address if applicable final UnitsetIpService(@SerializedName(value = ipservice) Geo.IPLocationService ipService)Service or provider used to determine geolocation from IP address if applicable final StringgetCountry()Country code using ISO-3166-1-alpha-3. final UnitsetCountry(@SerializedName(value = country) String country)Country code using ISO-3166-1-alpha-3. final StringgetRegion()Region code using ISO-3166-2; 2-letter state code if USA. final UnitsetRegion(@SerializedName(value = region) String region)Region code using ISO-3166-2; 2-letter state code if USA. final StringgetRegionFIPS104()Region of a country using FIPS 10-4 notation. final UnitsetRegionFIPS104(@SerializedName(value = regionfips104) String regionFIPS104)Region of a country using FIPS 10-4 notation. final StringgetMetro()Google metro code; similar to but not exactly Nielsen DMAs. final UnitsetMetro(@SerializedName(value = metro) String metro)Google metro code; similar to but not exactly Nielsen DMAs. final StringgetCity()City using United Nations Code for Trade & Transport Locations. final UnitsetCity(@SerializedName(value = city) String city)City using United Nations Code for Trade & Transport Locations. final StringgetZip()Zip or postal code. final UnitsetZip(@SerializedName(value = zip) String zip)Zip or postal code. final IntegergetLocalTime()Local time as the number +/- of minutes from UTC. final UnitsetLocalTime(@SerializedName(value = utcoffset) Integer localTime)Local time as the number +/- of minutes from UTC. final ObjectgetExtension()Placeholder for exchange-specific extensions to OpenRTB. final UnitsetExtension(@SerializedName(value = ext) Object extension)Placeholder for exchange-specific extensions to OpenRTB. -
-
Method Detail
-
getLatitude
final Float getLatitude()
Latitude from -90.0 to +90.0, where negative is south.
-
setLatitude
final Unit setLatitude(@SerializedName(value = lat) Float latitude)
Latitude from -90.0 to +90.0, where negative is south.
-
getLongitude
final Float getLongitude()
Longitude from -180.0 to +180.0, where negative is west.
-
setLongitude
final Unit setLongitude(@SerializedName(value = lon) Float longitude)
Longitude from -180.0 to +180.0, where negative is west.
-
getType
final Geo.GeoType getType()
Source of location data; recommended when passing lat/lon.
-
setType
final Unit setType(@SerializedName(value = type) Geo.GeoType type)
Source of location data; recommended when passing lat/lon.
-
getAccuracy
final Integer getAccuracy()
Estimated location accuracy in meters; recommended when lat/lon are specified and derived from a device’s location services (i.e., type = 1).
-
setAccuracy
final Unit setAccuracy(@SerializedName(value = accuracy) Integer accuracy)
Estimated location accuracy in meters; recommended when lat/lon are specified and derived from a device’s location services (i.e., type = 1).
-
getLastFix
final Integer getLastFix()
Number of seconds since this geolocation fix was established. Note that devices may cache location data across multiple fetches. Ideally, this value should be from the time the actual fix was taken.
-
setLastFix
final Unit setLastFix(@SerializedName(value = lastfix) Integer lastFix)
Number of seconds since this geolocation fix was established. Note that devices may cache location data across multiple fetches. Ideally, this value should be from the time the actual fix was taken.
-
getIpService
final Geo.IPLocationService getIpService()
Service or provider used to determine geolocation from IP address if applicable
-
setIpService
final Unit setIpService(@SerializedName(value = ipservice) Geo.IPLocationService ipService)
Service or provider used to determine geolocation from IP address if applicable
-
getCountry
final String getCountry()
Country code using ISO-3166-1-alpha-3.
-
setCountry
final Unit setCountry(@SerializedName(value = country) String country)
Country code using ISO-3166-1-alpha-3.
-
setRegion
final Unit setRegion(@SerializedName(value = region) String region)
Region code using ISO-3166-2; 2-letter state code if USA.
-
getRegionFIPS104
final String getRegionFIPS104()
Region of a country using FIPS 10-4 notation. While OpenRTB supports this attribute, it has been withdrawn by NIST in 2008.
-
setRegionFIPS104
final Unit setRegionFIPS104(@SerializedName(value = regionfips104) String regionFIPS104)
Region of a country using FIPS 10-4 notation. While OpenRTB supports this attribute, it has been withdrawn by NIST in 2008.
-
setMetro
final Unit setMetro(@SerializedName(value = metro) String metro)
Google metro code; similar to but not exactly Nielsen DMAs.
-
setCity
final Unit setCity(@SerializedName(value = city) String city)
City using United Nations Code for Trade & Transport Locations.
-
getLocalTime
final Integer getLocalTime()
Local time as the number +/- of minutes from UTC.
-
setLocalTime
final Unit setLocalTime(@SerializedName(value = utcoffset) Integer localTime)
Local time as the number +/- of minutes from UTC.
-
getExtension
final Object getExtension()
Placeholder for exchange-specific extensions to OpenRTB.
-
setExtension
final Unit setExtension(@SerializedName(value = ext) Object extension)
Placeholder for exchange-specific extensions to OpenRTB.
-
-
-
-