EILIndoorLocationView Class Reference
| Inherits from | UIView |
|---|---|
| Declared in | EILIndoorLocationView.h EILIndoorLocationView.m |
Properties
delegate
The delegate object to receive identifier of selected object in location view.
@property (nonatomic, weak, nullable) id<EILIndoorLocationViewDelegate> delegateDeclared In
EILIndoorLocationView.h
location
EILLocation object to be drawn.
@property (nonatomic, strong, readonly, nullable) EILLocation *locationDeclared In
EILIndoorLocationView.h
showTrace
If YES, then a trace will be displayed.
@property (nonatomic, assign) BOOL showTraceDeclared In
EILIndoorLocationView.h
rotateOnPositionUpdate
If YES, then the view will be rotated so the position indicator will always be pointing up.
@property (nonatomic, assign) BOOL rotateOnPositionUpdateDeclared In
EILIndoorLocationView.h
locationDrawn
Determines if location was drawn successfully.
@property (nonatomic, assign, readonly) BOOL locationDrawnDeclared In
EILIndoorLocationView.h
Styling properties
positionView
View representing current position indicator.
@property (nonatomic, strong, nullable) UIView *positionViewDeclared In
EILIndoorLocationView.h
positionImage
Image used as current position indicator.
@property (nonatomic, strong, nullable) IBInspectable UIImage *positionImageDeclared In
EILIndoorLocationView.h
locationBorderColor
Color of the location boundary.
@property (nonatomic, strong) IBInspectable UIColor *locationBorderColorDeclared In
EILIndoorLocationView.h
locationBorderThickness
Thickness of the location boundary.
@property (nonatomic, assign) IBInspectable NSInteger locationBorderThicknessDeclared In
EILIndoorLocationView.h
doorColor
Color of the location door.
@property (nonatomic, strong) IBInspectable UIColor *doorColorDeclared In
EILIndoorLocationView.h
doorThickness
Thickness of the location door.
@property (nonatomic, assign) IBInspectable NSInteger doorThicknessDeclared In
EILIndoorLocationView.h
windowColor
Color of the location window.
@property (nonatomic, strong) IBInspectable UIColor *windowColorDeclared In
EILIndoorLocationView.h
windowBackgroundColor
Color of the location window background.
@property (nonatomic, strong) IBInspectable UIColor *windowBackgroundColorDeclared In
EILIndoorLocationView.h
windowThickness
Thickness of the location window.
@property (nonatomic, assign) IBInspectable NSInteger windowThicknessDeclared In
EILIndoorLocationView.h
traceColor
Color of the location trace.
@property (nonatomic, strong) IBInspectable UIColor *traceColorDeclared In
EILIndoorLocationView.h
traceThickness
Thickness of the trace.
@property (nonatomic, assign) IBInspectable NSInteger traceThicknessDeclared In
EILIndoorLocationView.h
wallLengthLabelsColor
Color of the wall length labels.
@property (nonatomic, strong) IBInspectable UIColor *wallLengthLabelsColorDeclared In
EILIndoorLocationView.h
showWallLengthLabels
If YES, then wall length labels will be displayed.
@property (nonatomic, assign) IBInspectable BOOL showWallLengthLabelsDeclared In
EILIndoorLocationView.h
wallLengthLabelFontSize
Font size for wall length labels.
@property (nonatomic, assign) IBInspectable NSInteger wallLengthLabelFontSizeDeclared In
EILIndoorLocationView.h
showBeacons
If YES, then beacons will be displayed.
@property (nonatomic, assign) IBInspectable BOOL showBeaconsDeclared In
EILIndoorLocationView.h
Drawing location
– drawLocation:
Draws a graphical representation of EILLocation object.
- (void)drawLocation:(EILLocation *)locationParameters
location |
Object representing current location. |
|---|
Declared In
EILIndoorLocationView.h
– drawLocation:inRegionOfInterest:
Draws a graphical representation of EILLocation object
cropped to only include things explicitly inside the chosen
region (defined by bounding box).
- (void)drawLocation:(EILLocation *)location inRegionOfInterest:(CGRect)regionOfInterestParameters
location |
Object representing current location. |
|---|---|
regionOfInterest |
Region of interest to be drawn. |
Declared In
EILIndoorLocationView.h
Handling position updates
– updatePosition:
Updates current position indicator to the given position. If position is nil, indicator is hidden.
Will throw an exception if called without first calling drawLocation:.
- (void)updatePosition:(nullable EILOrientedPoint *)positionParameters
position |
Object representing current position in the location. |
|---|
Declared In
EILIndoorLocationView.h
Drawing trace
– clearTrace
Clears the trace.
- (void)clearTraceDiscussion
Will throw an exception if called without first calling drawLocation:.
Declared In
EILIndoorLocationView.h
Drawing user objects
– drawObjectInBackground:withPosition:identifier:
Draws a view that represents a real object at given position in background.
- (void)drawObjectInBackground:(UIView *)object withPosition:(EILOrientedPoint *)position identifier:(NSString *)identifierParameters
object |
View representing a real object. Cannot be nil. |
|---|---|
position |
Object representing position in the location. Cannot be nil. |
identifier |
Unique identifier by which view will be identified. Cannot be nil. |
Discussion
Background objects are drawn in order of addition below all other views.
Object will be rotated with regard to location to match orientation of the position.
Will throw an exception if called without first calling drawLocation:.
Chosen identifier cannot be same as any beacon identifier or kPositionViewIdentifier (“com.estimote.position.view”).
Declared In
EILIndoorLocationView.h
– drawObjectInForeground:withPosition:identifier:
Draws a view that represents a real object at given position in foreground.
- (void)drawObjectInForeground:(UIView *)object withPosition:(EILOrientedPoint *)position identifier:(NSString *)identifierParameters
object |
View representing a real object. Cannot be nil. |
|---|---|
position |
Object representing position in the location. Cannot be nil. |
identifier |
Unique identifier by which view will be identified. Cannot be nil. |
Discussion
Foreground objects are drawn in order of addition on top of background objects,
location and trace, but below position view. Object will be rotated with
regard to location to match orientation of the position.
Will throw an exception if called without first calling drawLocation:.
Chosen identifier cannot be same as any beacon MAC address or kPositionViewIdentifier (“com.estimote.position.view”).
Declared In
EILIndoorLocationView.h
– objectWithidentifier:
Returns view for object that was previously added to location view.
- (nullable UIView *)objectWithidentifier:(NSString *)identifierParameters
identifier |
Unique identifier by which view is identified. Cannot be nil. |
|---|
Return Value
view for object with provided identifier.
Discussion
For tapped beacon its identifier will be returned. For tapped position view kPositionViewIdentifier (“com.estimote.position.view”) will be returned.
Declared In
EILIndoorLocationView.h
– moveObjectWithIdentifier:toPosition:animated:
Moves an object identified by identifier to a given position.
- (void)moveObjectWithIdentifier:(NSString *)identifier toPosition:(EILOrientedPoint *)position animated:(BOOL)animatedParameters
identifier |
Unique identifier by which view will be identified. Cannot be nil. |
|---|---|
position |
Object representing position in the location. Cannot be nil. |
animated |
Whether transition should be animated. |
Discussion
Object will be be rotated with regard to location to match orientation of the position. If animated is set to true, the transition will be animated with 0.1 s duration. Will throw an exception, if there is no view with corresponding identifier.
Declared In
EILIndoorLocationView.h
– removeObjectWithIdentifier:
Removes an object identified by identifier from the view.
- (void)removeObjectWithIdentifier:(NSString *)identifierParameters
identifier |
Unique identifier by which view will be identified. Cannot be nil. |
|---|
Discussion
Will throw an exception, if there is no view with corresponding identifier.
Declared In
EILIndoorLocationView.h
Real to image coordinate calculations
– calculatePictureCoordinateForRealX:
Calculates X in view coordinate system from X in physical coordinate system.
- (CGFloat)calculatePictureCoordinateForRealX:(double)realXParameters
realX |
X coordinate in physical coordinate system (in meters). |
|---|
Return Value
X coordinate in view coordinate system (in pixels).
Declared In
EILIndoorLocationView.h
– calculatePictureCoordinateForRealY:
Calculates Y in view coordinate system from Y in physical coordinate system.
- (CGFloat)calculatePictureCoordinateForRealY:(double)realYParameters
realY |
Y coordinate in physical coordinate system (in meters). |
|---|
Return Value
Y coordinate in view coordinate system (in pixels).
Declared In
EILIndoorLocationView.h
– calculatePicturePointFromRealPoint:
Calculates point in view coordinate system from point in physical coordinate system.
- (CGPoint)calculatePicturePointFromRealPoint:(EILPoint *)realPointParameters
realPoint |
Point with coordinates in physical coordinate system (in meters). |
|---|
Return Value
Point with coordinates in view coordinate system (in pixels).
Declared In
EILIndoorLocationView.h
– calculateRealCoordinateForPictureX:
Calculates X in physical coordinate system from X in view coordinate system.
- (double)calculateRealCoordinateForPictureX:(CGFloat)pictureXParameters
realX |
X coordinate in view coordinate system (in pixels). |
|---|
Return Value
X coordinate in physical coordinate system (in meters).
Declared In
EILIndoorLocationView.h
– calculateRealCoordinateForPictureY:
Calculates Y in physical coordinate system from T in view coordinate system.
- (double)calculateRealCoordinateForPictureY:(CGFloat)pictureYParameters
realY |
Y coordinate in view coordinate system (in pixels). |
|---|
Return Value
Y coordinate in physical coordinate system (in meters).
Declared In
EILIndoorLocationView.h
– calculateRealPointFromPicturePoint:
Calculates point in physical coordinate system from point in view coordinate system.
- (EILPoint *)calculateRealPointFromPicturePoint:(CGPoint)picturePointParameters
realPoint |
Point with coordinates in view coordinate system (in pixels). |
|---|
Return Value
Point with coordinates in physical coordinate system (in meters).
Declared In
EILIndoorLocationView.h