RMMarker.h
1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//
// RMMarker.h
// MapView
//
// Created by Joseph Gentle on 13/10/08.
// Copyright 2008 __MyCompanyName__. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "RMMapLayer.h"
#import "RMFoundation.h"
@class RMMarkerStyle;
extern NSString * const RMMarkerBlueKey;
extern NSString * const RMMarkerRedKey;
@interface RMMarker : RMMapLayer <RMMovingMapLayer> {
RMXYPoint location;
NSObject* data;
// A label which comes up when you tap the marker
UILabel* label;
}
+ (RMMarker*) markerWithNamedStyle: (NSString*) styleName;
+ (CGImageRef) markerImage: (NSString *) key;
+ (CGImageRef) loadPNGFromBundle: (NSString *)filename;
- (id) initWithCGImage: (CGImageRef) image anchorPoint: (CGPoint) anchorPoint;
- (id) initWithCGImage: (CGImageRef) image;
- (id) initWithKey: (NSString*) key;
- (id) initWithUIImage: (UIImage*) image;
- (id) initWithStyle: (RMMarkerStyle*) style;
- (id) initWithNamedStyle: (NSString*) styleName;
- (void) setLabel: (UILabel*)aLabel;
- (void) setTextLabel: (NSString*)text;
- (void) setTextLabel: (NSString*)text toPosition:(CGPoint)position;
- (void) toggleLabel;
- (void) showLabel;
- (void) hideLabel;
- (void) removeLabel;
- (void) replaceImage:(CGImageRef)image anchorPoint:(CGPoint)_anchorPoint;
- (void) hide;
- (void) unhide;
- (void) dealloc;
@property (assign, nonatomic) RMXYPoint location;
@property (retain) NSObject* data;
@property (nonatomic, retain) UILabel* label;
// Call this with either RMMarkerBlue or RMMarkerRed for the key.
+ (CGImageRef) markerImage: (NSString *) key;
@end