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> delegate
Declared In
EILIndoorLocationView.h
location
EILLocation
object to be drawn.
@property (nonatomic, strong, readonly, nullable) EILLocation *location
Declared In
EILIndoorLocationView.h
showTrace
If YES, then a trace will be displayed.
@property (nonatomic, assign) BOOL showTrace
Declared 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 rotateOnPositionUpdate
Declared In
EILIndoorLocationView.h
locationDrawn
Determines if location was drawn successfully.
@property (nonatomic, assign, readonly) BOOL locationDrawn
Declared In
EILIndoorLocationView.h
Styling properties
positionView
View representing current position indicator.
@property (nonatomic, strong, nullable) UIView *positionView
Declared In
EILIndoorLocationView.h
positionImage
Image used as current position indicator.
@property (nonatomic, strong, nullable) IBInspectable UIImage *positionImage
Declared In
EILIndoorLocationView.h
locationBorderColor
Color of the location boundary.
@property (nonatomic, strong) IBInspectable UIColor *locationBorderColor
Declared In
EILIndoorLocationView.h
locationBorderThickness
Thickness of the location boundary.
@property (nonatomic, assign) IBInspectable NSInteger locationBorderThickness
Declared In
EILIndoorLocationView.h
doorColor
Color of the location door.
@property (nonatomic, strong) IBInspectable UIColor *doorColor
Declared In
EILIndoorLocationView.h
doorThickness
Thickness of the location door.
@property (nonatomic, assign) IBInspectable NSInteger doorThickness
Declared In
EILIndoorLocationView.h
windowColor
Color of the location window.
@property (nonatomic, strong) IBInspectable UIColor *windowColor
Declared In
EILIndoorLocationView.h
windowBackgroundColor
Color of the location window background.
@property (nonatomic, strong) IBInspectable UIColor *windowBackgroundColor
Declared In
EILIndoorLocationView.h
windowThickness
Thickness of the location window.
@property (nonatomic, assign) IBInspectable NSInteger windowThickness
Declared In
EILIndoorLocationView.h
traceColor
Color of the location trace.
@property (nonatomic, strong) IBInspectable UIColor *traceColor
Declared In
EILIndoorLocationView.h
traceThickness
Thickness of the trace.
@property (nonatomic, assign) IBInspectable NSInteger traceThickness
Declared In
EILIndoorLocationView.h
wallLengthLabelsColor
Color of the wall length labels.
@property (nonatomic, strong) IBInspectable UIColor *wallLengthLabelsColor
Declared In
EILIndoorLocationView.h
showWallLengthLabels
If YES, then wall length labels will be displayed.
@property (nonatomic, assign) IBInspectable BOOL showWallLengthLabels
Declared In
EILIndoorLocationView.h
wallLengthLabelFontSize
Font size for wall length labels.
@property (nonatomic, assign) IBInspectable NSInteger wallLengthLabelFontSize
Declared In
EILIndoorLocationView.h
showBeacons
If YES, then beacons will be displayed.
@property (nonatomic, assign) IBInspectable BOOL showBeacons
Declared In
EILIndoorLocationView.h
Drawing location
– drawLocation:
Draws a graphical representation of EILLocation
object.
- (void)drawLocation:(EILLocation *)location
Parameters
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)regionOfInterest
Parameters
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 *)position
Parameters
position |
Object representing current position in the location. |
---|
Declared In
EILIndoorLocationView.h
Drawing trace
– clearTrace
Clears the trace.
- (void)clearTrace
Discussion
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 *)identifier
Parameters
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 *)identifier
Parameters
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 *)identifier
Parameters
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)animated
Parameters
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 *)identifier
Parameters
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)realX
Parameters
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)realY
Parameters
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 *)realPoint
Parameters
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)pictureX
Parameters
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)pictureY
Parameters
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)picturePoint
Parameters
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