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 *locationDeclared In
EILIndoorLocationScene.h
showBeacons
If YES, then a beacons will be displayed. Default: YES.
@property (nonatomic, assign) BOOL showBeaconsDeclared In
EILIndoorLocationScene.h
showTrace
If YES, then a trace will be displayed. Default: NO.
@property (nonatomic, assign) BOOL showTraceDeclared 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 rotateLocationOnPositionUpdateDeclared 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 locationScaleDiscussion
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 moveAnimationDurationDeclared 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 ) touchHandlerParameters
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 *avatarImageNameDeclared 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 *backgroundImageNameDeclared 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 *centerUserButtonImageNameDeclared 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 *compassButtonImageNameDeclared In
EILIndoorLocationScene.h
locationBorderColor
strokeColor property value of the shape node that represents location border. Default: Black.
@property (nonatomic, strong) UIColor *locationBorderColorDeclared In
EILIndoorLocationScene.h
locationBorderThickness
lindeWidth property value of the shape node that represents location border.
@property (nonatomic, assign) CGFloat locationBorderThicknessDeclared In
EILIndoorLocationScene.h
windowColor
strokeColor property value of the shape nodes that represent linear objects of type EILLocationLinearObjectTypeWindow.
Default: Blue.
@property (nonatomic, strong) UIColor *windowColorDeclared In
EILIndoorLocationScene.h
windowThickness
lindeWidth property value of the shape nodes that represent linear objects of type EILLocationLinearObjectTypeWindow.
@property (nonatomic, assign) CGFloat windowThicknessDeclared In
EILIndoorLocationScene.h
doorColor
strokeColor property value of the shape nodes that represent linear objects of type EILLocationLinearObjectTypeDoor.
Default: White.
@property (nonatomic, strong) UIColor *doorColorDeclared In
EILIndoorLocationScene.h
doorThickness
lindeWidth property value of the shape nodes that represent linear objects of type EILLocationLinearObjectTypeDoor.
@property (nonatomic, assign) CGFloat doorThicknessDeclared In
EILIndoorLocationScene.h
traceColor
strokeColor property value of the shape node that represesnts trace. Default: Yellow.
@property (nonatomic, strong) UIColor *traceColorDeclared In
EILIndoorLocationScene.h
traceThickness
lineWidth property value of the shape node that represents trace.
@property (nonatomic, assign) CGFloat traceThicknessDeclared 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 beaconSizeDeclared In
EILIndoorLocationScene.h
Drawing location
– drawLocation:
Draws a graphical representation of EILLocation object.
- (void)drawLocation:(EILLocation *)locationParameters
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)accuracyParameters
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 *)positionParameters
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)centerOnUserDeclared In
EILIndoorLocationScene.h
Drawing trace
– clearTrace
Clears the trace by removing trace node.
- (void)clearTraceDeclared In
EILIndoorLocationScene.h