EILIndoorLocationScene Class Reference
Inherits from | SKScene |
---|---|
Declared in | EILIndoorLocationScene.h EILIndoorLocationScene.m |
Overview
A subclass of SKScene designed to draw EILLocation and user position inside it. Provides a build in mechanism for handling zoom in/out, rotation and pan gestures.
Properties
location
Currently presented EILLocation
object.
@property (nonatomic, strong, readonly, nullable) EILLocation *location
Declared In
EILIndoorLocationScene.h
showBeacons
If YES, then a beacons will be displayed. Default: YES.
@property (nonatomic, assign) BOOL showBeacons
Declared In
EILIndoorLocationScene.h
showTrace
If YES, then a trace will be displayed. Default: NO.
@property (nonatomic, assign) BOOL showTrace
Declared In
EILIndoorLocationScene.h
rotateLocationOnPositionUpdate
If YES, then the location will be rotated with position updates making the position indicator always point up. If NO, then the position indicator will rotate together with position updates leaving the location unrotated. Changes after touching compass button. Default: NO.
@property (nonatomic, assign) BOOL rotateLocationOnPositionUpdate
Declared In
EILIndoorLocationScene.h
locationScale
Value calculated after calling drawLocation:
.
Factor by which every location coordinate is multiplied before drawing.
Value doesn’t change while zooming in/out.
@property (nonatomic, assign, readonly) CGFloat locationScale
Discussion
Use it to transform scene coordinates to real coordinates. sceneCoordinate = realCoordinate * locationScale realCoordinate = sceneCoordinate / locationScale
Declared In
EILIndoorLocationScene.h
moveAnimationDuration
Length of move position animation.
@property (nonatomic, assign) double moveAnimationDuration
Declared In
EILIndoorLocationScene.h
touchHandler
Block of code that will be invoked every time a node on EILIndoorLocationScene
is touched.
@property (nonatomic, copy, nullable) void ( ^ ) ( NSString *nodeName ) touchHandler
Parameters
nodeName |
Name of node that was touched. |
---|
Declared In
EILIndoorLocationScene.h
Styling properties
avatarImageName
Name of the image asset that should be used as an avatar. Avatar node will be recreated after each change of this property.
@property (nonatomic, strong, nullable) NSString *avatarImageName
Declared In
EILIndoorLocationScene.h
backgroundImageName
Name of the image asset that should be used as a background. It will be resized to fit location size. If background image represents a floorplan it shouldn’t contain any margins to fit properly. Background node will be recreated after each change of this property.
@property (nonatomic, strong, nullable) NSString *backgroundImageName
Declared In
EILIndoorLocationScene.h
centerUserButtonImageName
Name of the image asset that should be used as a center user button. Center user button node will be recreated after each change of this property.
@property (nonatomic, strong, nullable) NSString *centerUserButtonImageName
Declared In
EILIndoorLocationScene.h
compassButtonImageName
Name of the image asset that should be used as a compass button. Compass button node will be recreated after each change of this property.
@property (nonatomic, strong, nullable) NSString *compassButtonImageName
Declared In
EILIndoorLocationScene.h
locationBorderColor
strokeColor property value of the shape node that represents location border. Default: Black.
@property (nonatomic, strong) UIColor *locationBorderColor
Declared In
EILIndoorLocationScene.h
locationBorderThickness
lindeWidth property value of the shape node that represents location border.
@property (nonatomic, assign) CGFloat locationBorderThickness
Declared In
EILIndoorLocationScene.h
windowColor
strokeColor property value of the shape nodes that represent linear objects of type EILLocationLinearObjectTypeWindow
.
Default: Blue.
@property (nonatomic, strong) UIColor *windowColor
Declared In
EILIndoorLocationScene.h
windowThickness
lindeWidth property value of the shape nodes that represent linear objects of type EILLocationLinearObjectTypeWindow
.
@property (nonatomic, assign) CGFloat windowThickness
Declared In
EILIndoorLocationScene.h
doorColor
strokeColor property value of the shape nodes that represent linear objects of type EILLocationLinearObjectTypeDoor
.
Default: White.
@property (nonatomic, strong) UIColor *doorColor
Declared In
EILIndoorLocationScene.h
doorThickness
lindeWidth property value of the shape nodes that represent linear objects of type EILLocationLinearObjectTypeDoor
.
@property (nonatomic, assign) CGFloat doorThickness
Declared In
EILIndoorLocationScene.h
traceColor
strokeColor property value of the shape node that represesnts trace. Default: Yellow.
@property (nonatomic, strong) UIColor *traceColor
Declared In
EILIndoorLocationScene.h
traceThickness
lineWidth property value of the shape node that represents trace.
@property (nonatomic, assign) CGFloat traceThickness
Declared In
EILIndoorLocationScene.h
beaconSize
size property value of the sprite nodes that represent beacons.
If this value is supposed to be different than default, set it before calling drawLocation:
.
@property (nonatomic, assign) CGSize beaconSize
Declared In
EILIndoorLocationScene.h
Drawing location
– drawLocation:
Draws a graphical representation of EILLocation
object.
- (void)drawLocation:(EILLocation *)location
Parameters
location |
Object representing current location. |
---|
Declared In
EILIndoorLocationScene.h
Handling position updates
– updateUserPosition:withAccuracy:
Updates avatar position to the given position.
If position is nil, avatar node is removed from scene.
Sets showAccuracy
to YES on EILPositionNode
class object that represents avatar.
- (void)updateUserPosition:(nullable EILOrientedPoint *)position withAccuracy:(CGFloat)accuracy
Parameters
position |
Object representing current position in the location. |
---|---|
accuracy |
Value describing accuracy of position estimation. Calls |
Declared In
EILIndoorLocationScene.h
– updateUserPosition:
Updates avatar position to the given position.
If position is nil, avatar node is removed from scene.
Sets showAccuracy
to NO on EILPositionNode
class object that represents avatar.
- (void)updateUserPosition:(nullable EILOrientedPoint *)position
Parameters
position |
Object representing current position in the location. |
---|
Declared In
EILIndoorLocationScene.h
– centerOnUser
Sets camera property position to current position of avatar node in an animated way. Called after touching center user button.
- (void)centerOnUser
Declared In
EILIndoorLocationScene.h
Drawing trace
– clearTrace
Clears the trace by removing trace node.
- (void)clearTrace
Declared In
EILIndoorLocationScene.h