RMMarker.h 1.22 KB
//
//  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;
}

+ (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) addLabel: (UIView*)label;
- (void) addTextLabel: (NSString*)text;

- (void) dealloc;

@property (assign, nonatomic) RMXYPoint location;
@property (retain) NSObject* data;

// Call this with either RMMarkerBlue or RMMarkerRed for the key.
+ (CGImageRef) markerImage: (NSString *) key;

- (NSInteger) getPixelWidthForFont:(NSString *)aString font:(UIFont *)aFont;
@end