MapsIndoors iOS SDK V3
Loading...
Searching...
No Matches
Instance Methods | Class Methods | Properties | List of all members
MPLocationUpdate Class Reference

#include <MPLocationUpdate.h>

Inheritance diagram for MPLocationUpdate:

Instance Methods

(instancetype) - UNAVAILABLE_ATTRIBUTE
 
(void) - addPropertyValue:forKey:
 
(void) - addCategory:
 
(MPLocation *) - location
 

Class Methods

(MPLocationUpdate *) + updateWithLocation:
 
(MPLocationUpdate *) + updateWithId:fromSource:
 

Properties

NSInteger sourceId
 
NSInteger locationId
 
NSString * type
 
NSString * name
 
NSInteger floor
 
CLLocationCoordinate2D position
 
UIImage * icon
 
NSURL * iconUrl
 
CGPoint iconMapAnchor
 

Detailed Description

Location Update / Builder class

Method Documentation

◆ addCategory:

- (void) addCategory: (NSString *) categoryKey

Add category key. Possible categories can be reviewed in MapsIndoors CMS or programmatically using the MPCategoriesProvider

Parameters
categoryKeyThe category key

◆ addPropertyValue:forKey:

- (void) addPropertyValue: (NSString *) value
forKey: (NSString *) key 

Adds a property to the location update. Some keys will be recognised as a key for a known property on the resulting MPLocation. If they are not recognised or the known property only supports one value, the property will be added as a field on MPLocation.fields

Parameters
valueThe string value for the property
keyThe key for the property

◆ location

- (MPLocation *) location

Builds the location object. Should only be called once per intended location instance.

◆ UNAVAILABLE_ATTRIBUTE

- (instancetype) UNAVAILABLE_ATTRIBUTE

◆ updateWithId:fromSource:

+ (MPLocationUpdate *) updateWithId: (NSInteger) locationId
fromSource: (id< MPLocationSource >) locationSource 

Initialiser that creates a MPLocationUpdate instance based on an id and a location source.

Parameters
locationIdLocation id. This id is expected to be unique for a given location source, but not necessarily unique across multiple location sources.
locationSourceThe location source that is going to maintain this location.
Returns
The updater object.

◆ updateWithLocation:

+ (MPLocationUpdate *) updateWithLocation: (MPLocation *) location

Initialiser that creates a MPLocationUpdate instance based on an existing location.

Parameters
locationThe existing location.
Returns
The updater object.

Property Documentation

◆ floor

- (NSInteger) floor
readwritenonatomicassign

The floor index of the Location. Must be set to a valid floor index. If unknown, these can be seen in MapsIndoors CMS.

◆ icon

- (UIImage*) icon
readwritenonatomicstrong

Location icon. If not set, the location will either get an icon from the settings configured for the type of location or a default appearance that is configurable through MPMapControl.

◆ iconMapAnchor

- (CGPoint) iconMapAnchor
readwritenonatomicassign

Icon map anchor specifies the point in the icon image that is anchored to the marker's position on the Earth's surface. E.g. point 0.5, 0.5 is the middle of the image.

◆ iconUrl

- (NSURL*) iconUrl
readwritenonatomicstrong

Location icon as a URL. If icon is set as a UIImage, this property will be ignored.

◆ locationId

- (NSInteger) locationId
readnonatomicassign

The id of the Location. This id is not unique across multiple location sources.

◆ name

- (NSString*) name
readwritenonatomicstrong

The name of the Location.

◆ position

- (CLLocationCoordinate2D) position
readwritenonatomicassign

The geographical position of the Location.

◆ sourceId

- (NSInteger) sourceId
readnonatomicassign

The id of the Location Source where this location was created

◆ type

- (NSString*) type
readwritenonatomicstrong

The type of the Location.