EILLocation Class Reference
| Inherits from | NSObject |
|---|---|
| Conforms to | NSCoding |
| Declared in | EILLocation.h EILLocation.m |
Overview
Represents a physical location prepared for Estimote Indoor Location. Object is immutable.
Instances of EILLocation can be obtained by fetching from the Estimote Cloud (see EILRequestFetchLocation and EILRequestFetchLocations), created by EILLocationBuilder or by importing JSON with [EILLocationBuilder parseFromJSON:].
Properties
identifier
Globally unique identifier of the location. Identifier is being set by server once location is persisted.
@property (nonatomic, strong, readonly, nullable) NSString *identifierDeclared In
EILLocation.h
name
Name of the location.
@property (nonatomic, strong, readonly) NSString *nameDeclared In
EILLocation.h
geographicalLocation
Geographical location of the location.
@property (nonatomic, strong, readonly, nullable) NSDictionary *geographicalLocationDeclared In
EILLocation.h
latitude
Latitude of geographical location of the location
@property (nonatomic, strong, readonly, nullable) NSNumber *latitudeDeclared In
EILLocation.h
longitude
Longitude of geographical location of the location
@property (nonatomic, strong, readonly, nullable) NSNumber *longitudeDeclared In
EILLocation.h
owner
Email address of the owner of the location.
@property (nonatomic, strong, readonly, nullable) NSString *ownerDeclared In
EILLocation.h
isPublic
Visibility of the location (private/public).
@property (nonatomic, assign, readonly) BOOL isPublicDeclared In
EILLocation.h
boundarySegments
Boundary of the location.
@property (nonatomic, strong, readonly) NSArray<EILOrientedLineSegment*> *boundarySegmentsDeclared In
EILLocation.h
shape
Bezier path of the boundary of the location.
@property (nonatomic, strong, readonly) UIBezierPath *shapeDeclared In
EILLocation.h
polygon
Polygon of shape of the location. Points are sorted clockwise.
@property (nonatomic, strong, readonly, nullable) NSArray<EILPoint*> *polygonDeclared In
EILLocation.h
area
Area of the location in square meters.
@property (nonatomic, assign, readonly) double areaDeclared In
EILLocation.h
boundingBox
Bounding box of the location.
@property (nonatomic, assign, readonly) CGRect boundingBoxDeclared In
EILLocation.h
linearObjects
Linear objects inside the location.
@property (nonatomic, strong, readonly) NSArray<EILLocationLinearObject*> *linearObjectsDeclared In
EILLocation.h
beacons
Beacons located in the location.
@property (nonatomic, strong, readonly) NSArray<EILPositionedBeacon*> *beaconsDeclared In
EILLocation.h
orientation
Orientation to magnetic north, counted clockwise. Value is in degrees.
@property (nonatomic, assign, readonly) double orientationDeclared In
EILLocation.h
locationPins
Location pins that belong to location.
@property (nonatomic, strong, readonly, nullable) NSArray<EILLocationPin*> *locationPinsDeclared In
EILLocation.h
creationDate
Creation date.
@property (nonatomic, strong, readonly) NSDate *creationDateDeclared In
EILLocation.h
Creating and Initializing
– initWithLocation:
Copy constructor.
- (instancetype)initWithLocation:(EILLocation *)locationParameters
location |
The location. |
|---|
Return Value
A new location based on a given location.
Declared In
EILLocation.h
+ locationFromLocation:
Returns a new location based on a given location.
+ (EILLocation *)locationFromLocation:(EILLocation *)locationParameters
location |
The location. |
|---|
Return Value
A new location based on a given location.
Declared In
EILLocation.h
Serialization
+ locationFromDictionary:
Deserializes a location from NSDictionary.
+ (nullable EILLocation *)locationFromDictionary:(NSDictionary *)dictParameters
dict |
|
|---|
Return Value
A location created from NSDictionary.
Declared In
EILLocation.h
– toDictionary
Serializes the point to NSDictionary.
- (NSDictionary *)toDictionaryReturn Value
A location representation in NSDictionary.
Declared In
EILLocation.h
Utility methods
– locationTranslatedByDX:dY:
Translates the location by a given vector (dX, dY) and returns a new location.
- (EILLocation *)locationTranslatedByDX:(double)x dY:(double)yParameters
x |
Value of the translation on X axis. |
|---|---|
y |
Value of the translation on Y axis. |
Return Value
A new location translated by (dX, dY).
Declared In
EILLocation.h
– containsPointWithX:y:
Checks if a given point is inside the location.
- (BOOL)containsPointWithX:(double)x y:(double)yParameters
x |
X coordinate. |
|---|---|
y |
Y coordinate. |
Return Value
YES if given point is inside the location.
Declared In
EILLocation.h
– randomPointInside
Returns an equally distributed random point inside the location.
- (EILPoint *)randomPointInsideReturn Value
A random point inside the location.
Declared In
EILLocation.h
– linearObjectsWithType:
Filters this location linear objects and returns only those for given type.
- (NSArray<EILLocationLinearObject*> *)linearObjectsWithType:(EILLocationLinearObjectType)typeParameters
type |
Type of linear object to filter this location linear objects. |
|---|
Return Value
Linear objects with given type.
Declared In
EILLocation.h
Identifying and Comparing Objects
– isEqual:
Returns a Boolean value that indicates whether a given location is equal to this location.
- (BOOL)isEqual:(nullable id)otherParameters
other |
The object to be compared to this location. May be nil. |
|---|
Return Value
YES if locations are equal, otherwise NO.
Declared In
EILLocation.h
– isEqualToLocation:
- (BOOL)isEqualToLocation:(nullable EILLocation *)locationSee Also
Declared In
EILLocation.h
– hash
Returns an integer that can be used as a table address in a hash table structure.
- (NSUInteger)hashDeclared In
EILLocation.h
Describing Objects
– description
Returns a string representation of the location.
- (NSString *)descriptionReturn Value
A string representation of the location.
Declared In
EILLocation.h
Encoding and Decoding
– initWithCoder:
Returns a location initialized from data in a given unarchiver.
- (nullable instancetype)initWithCoder:(NSCoder *)decoderParameters
decoder |
An unarchiver object. |
|---|
Return Value
A new location initialized using the data in decoder.
Declared In
EILLocation.h
– encodeWithCoder:
Encodes the location using a given archiver.
- (void)encodeWithCoder:(NSCoder *)coderParameters
An |
archiver object. |
|---|
Declared In
EILLocation.h