EVGLocation Class Reference
Inherits from | NSObject |
---|---|
Declared in | EVGItems.h |
Overview
Location to associate with an Item, for example for filtering reasons if a product only available in an area.
latitude
Latitudinal coordinate of the location, should be from -90 to 90.
@property (nullable, nonatomic, strong) NSNumber *latitude
Declared In
EVGItems.h
longitude
Longitudinal coordinate of the location, should be from -180 to 180.
@property (nullable, nonatomic, strong) NSNumber *longitude
Declared In
EVGItems.h
stateProvinceCode
Name of the state or province.
@property (nullable, nonatomic, copy) NSString *stateProvinceCode
Declared In
EVGItems.h
postalCode
Postal code of the location.
@property (nullable, nonatomic, copy) NSString *postalCode
Declared In
EVGItems.h
+ locationWithLatitude:longitude:
Creates a location with geographic coordinates.
+ (nullable instancetype)locationWithLatitude:(double)latitude longitude:(double)longitude
Parameters
latitude |
Latitudinal coordinate, should be from -90 to 90 |
---|---|
longitude |
Longitudinal coordinate, should be from -180 to 180 |
Declared In
EVGItems.h
+ locationWithCity:stateProvinceCode:
Creates a location with city and state.
+ (nullable instancetype)locationWithCity:(nonnull NSString *)city stateProvinceCode:(nonnull NSString *)stateProvinceCode
Parameters
city |
City name |
---|---|
stateProvinceCode |
State or Province Code (e.g. MA) |
Declared In
EVGItems.h
+ locationWithPostalCode:
Creates a location with postal code.
+ (nullable instancetype)locationWithPostalCode:(nonnull NSString *)postalCode
Parameters
postalCode |
Postal code |
---|
Declared In
EVGItems.h
+ locationFromJSONDictionary:
Creates a location from the provided JSON.
+ (nullable instancetype)locationFromJSONDictionary:(nonnull NSDictionary<NSString*,id> *)json
Parameters
json |
A location in JSON form |
---|
Return Value
A location which can be further modified, or nil if JSON is invalid
Declared In
EVGItems.h