MPLocation
@interface MPLocation
This class holds the data for a single location and a marker to display the data on a map.
-
Location constructor. - parameter: point The geographic point. - parameter: name The name of the location.
Declaration
Objective-C
- (id)initWithPoint:(MPPoint *)point andName:(NSString *)name;
Swift
init!(point: MPPoint!, andName name: String!)
Parameters
point
The geographic point.
name
The name of the location.
-
Undocumented
Declaration
Objective-C
@interface MPLocation
-
Location ID string.
Declaration
Objective-C
@property (readwrite, strong, nonatomic) NSString *locationId;
Swift
var locationId: String! { get set }
-
Undocumented
Declaration
Objective-C
@interface MPLocation
-
Undocumented
Declaration
Objective-C
@interface MPLocation
-
Undocumented
Declaration
Objective-C
@interface MPLocation
-
Undocumented
Declaration
Objective-C
@interface MPLocation
-
Undocumented
Declaration
Objective-C
@interface MPLocation
-
Undocumented
Declaration
Objective-C
@interface MPLocation
-
Undocumented
Declaration
Objective-C
@interface MPLocation
-
Undocumented
Declaration
Objective-C
@interface MPLocation
-
Location name.
Declaration
Objective-C
@property (readwrite, strong, nonatomic) NSString *name;
Swift
var name: String! { get set }
-
If the location resides on a specific floor level, this string property is set.
Declaration
Objective-C
@property (readwrite, strong, nonatomic) NSNumber *floor;
Swift
var floor: NSNumber! { get set }
-
The categories for this location, as an array of strings.
Declaration
Objective-C
@property (readwrite, strong, nonatomic) NSMutableDictionary *categories;
Swift
var categories: NSMutableDictionary! { get set }
-
Dictionary of location properties. The keys ‘image’ and ‘description’ will always be present, and possibly others, such as ‘address’, ‘contact’, ‘openinghours’ and ‘_tags’ or your own data structure.
Declaration
Objective-C
@property (assign, readwrite, atomic) NSMutableDictionary *properties;
Swift
var properties: NSMutableDictionary! { get set }
-
Location image.
Declaration
Objective-C
@property (assign, readwrite, atomic) UIImage *image;
Swift
var image: UIImage! { get set }
-
Location display rule.
Declaration
Objective-C
@property (assign, readwrite, atomic) MPLocationDisplayRule *displayRule;
Swift
var displayRule: MPLocationDisplayRule! { get set }
-
Add the location to a map - parameter: map The map that will hold the marker.
Declaration
Objective-C
- (void)addToMap:(id)map;
Swift
func add(toMap map: Any!)
Parameters
map
The map that will hold the marker.
-
Add the location to a map with given display rules. - parameter: map The map that will hold the marker. - parameter: displayRuleset The display ruleset that defines the display of the marker. - see: MPLocationDisplayRuleset
Declaration
Objective-C
- (void)addToMap:(id)map WithRules:(MPLocationDisplayRuleset *)displayRuleset;
Swift
func add(toMap map: Any!, withRules displayRuleset: MPLocationDisplayRuleset!)
Parameters
map
The map that will hold the marker.
displayRuleset
The display ruleset that defines the display of the marker.
-
Add the location to a map with given display rules. - parameter: map The map that will hold the marker. - parameter: floor Floor level. - parameter: displayRuleset The display ruleset that defines the display of the marker. - see: MPLocationDisplayRuleset
Declaration
Objective-C
- (void)addToMap:(id)map floor:(int)floor WithRules:(MPLocationDisplayRuleset *)displayRuleset;
Swift
func add(toMap map: Any!, floor: Int32, withRules displayRuleset: MPLocationDisplayRuleset!)
Parameters
map
The map that will hold the marker.
floor
Floor level.
displayRuleset
The display ruleset that defines the display of the marker.
-
Update the location on a map with given display rules. - parameter: map The map that triggered the update. - parameter: displayRuleset The display ruleset that defines the display of the marker. - parameter: floor Floor level. - see: MPLocationDisplayRuleset
Declaration
Objective-C
- (void)updateView:(id)map floor:(int)floor displayRules:(MPLocationDisplayRuleset *)displayRuleset;
Swift
func updateView(_ map: Any!, floor: Int32, displayRules displayRuleset: MPLocationDisplayRuleset!)
Parameters
map
The map that triggered the update.
displayRuleset
The display ruleset that defines the display of the marker.
floor
Floor level.
-
Create a label image with a given text. - parameter: text The text to label with.
Declaration
Objective-C
- (UIImage *)drawLabel:(NSString *)text;
Swift
func drawLabel(_ text: String!) -> UIImage!
Parameters
text
The text to label with.
-
Undocumented
Declaration
Objective-C
@interface MPLocation
-
Set the location image based on information in: * [self.properties objectForKey:@
image
]; *Declaration
Objective-C
- (void)setImage;
Swift
func setImage()
-
Get location property of the given type identifier *
Declaration
Objective-C
- (MPLocationProperty *)getProperty:(NSString *)propertyType;
Swift
func getProperty(_ propertyType: String!) -> MPLocationProperty!
-
Undocumented
Declaration
Objective-C
@interface MPLocation
-
Undocumented
Declaration
Objective-C
@interface MPLocation
-
Undocumented
Declaration
Objective-C
@interface MPLocation