SPSmartMapObject

Objective-C

@interface SPSmartMapObject : NSObject

Swift

class SPSmartMapObject : NSObject

SmartMapObject

Data transfer object used for SPSmartMapView events.

Properties

  • Title that is displayed on the map for this object. Note that changing this property after the object has been added onto the map will not have any effect.

    Declaration

    Objective-C

    @property (nonatomic, strong) NSString *_Nonnull title;

    Swift

    var title: String { get set }
  • GPS latitude coordinate Note that changing this property after the object has been added onto the map will not have any effect.

    Declaration

    Objective-C

    @property (nonatomic) double latitude;

    Swift

    var latitude: Double { get set }
  • GPS longitude coordinate Note that changing this property after the object has been added onto the map will not have any effect.

    Declaration

    Objective-C

    @property (nonatomic) double longitude;

    Swift

    var longitude: Double { get set }
  • Floor index for object.

    How floor indexes work:

    Above ground level: floor > 0

    Ground level: floor == 0

    Below ground level: floor < 0

    Note that changing this property after the object has been added onto the map will not have any effect.

    Declaration

    Objective-C

    @property (nonatomic) NSInteger floorIndex;

    Swift

    var floorIndex: Int { get set }
  • Identifier for the map object. Corresponds to the ‘localRef’ property in the map data. Note that changing this property after the object has been added onto the map will not have any effect.

    Declaration

    Objective-C

    @property (nonatomic, strong) NSString *_Nonnull localRef;

    Swift

    var localRef: String { get set }
  • Unique building identifier Note that changing this property after the object has been added onto the map will not have any effect.

    Declaration

    Objective-C

    @property (nonatomic, strong) NSString *_Nonnull buildingRef;

    Swift

    var buildingRef: String { get set }
  • Source where the map object originates.

    ‘Static’ map objects are from the base map data. ‘Markers’ are user created map objects.

    Declaration

    Objective-C

    @property (nonatomic) SPObjectSource source;

    Swift

    var source: SPObjectSource { get set }
  • Metadata properties of the map object

    Declaration

    Objective-C

    @property (nonatomic, strong) NSDictionary *_Nonnull properties;

    Swift

    var properties: [AnyHashable : Any] { get set }

Initializer

  • Recommended constructor for SPSmartMapObject.

    Note that changing any properties after the object has been added onto the map will not affect the visualisation of the object.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithLatitude:(double)latitude
                                   longitude:(double)longitude
                                  floorIndex:(NSInteger)floorIndex
                                    localRef:(nonnull NSString *)localRef
                                 buildingRef:(nonnull NSString *)buildingRef;

    Swift

    init(latitude: Double, longitude: Double, floorIndex: Int, localRef: String, buildingRef: String)

    Parameters

    latitude

    gps latitude

    longitude

    gps longitude

    floorIndex

    the floor index to show

    localRef

    identifier for the map object. Corresponds to the ‘localRef’ property in the map data.

    buildingRef

    unique identifier for the building

    Return Value

    new instance of SPSmartMapObject