Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 102 lines (87 sloc) 4.332 kB
293aed8 @obrand69 Replaced UILabel with UIView to make it more generic
obrand69 authored
1 //
2 // RMMarker.h
3 //
b104cda @josephg Made license explicit on all route-me files. Added LICENSE and README…
josephg authored
4 // Copyright (c) 2008, Route-Me Contributors
5 // All rights reserved.
293aed8 @obrand69 Replaced UILabel with UIView to make it more generic
obrand69 authored
6 //
b104cda @josephg Made license explicit on all route-me files. Added LICENSE and README…
josephg authored
7 // Redistribution and use in source and binary forms, with or without
8 // modification, are permitted provided that the following conditions are met:
9 //
10 // * Redistributions of source code must retain the above copyright notice, this
11 // list of conditions and the following disclaimer.
12 // * Redistributions in binary form must reproduce the above copyright notice,
13 // this list of conditions and the following disclaimer in the documentation
14 // and/or other materials provided with the distribution.
15 //
16 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
20 // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23 // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24 // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26 // POSSIBILITY OF SUCH DAMAGE.
293aed8 @obrand69 Replaced UILabel with UIView to make it more generic
obrand69 authored
27
28 #import <UIKit/UIKit.h>
29 #import "RMMapLayer.h"
30 #import "RMFoundation.h"
31
32 @class RMMarkerStyle;
33
34 extern NSString * const RMMarkerBlueKey;
35 extern NSString * const RMMarkerRedKey;
36
317bfb3 @halmueller more Doxygen tags
halmueller authored
37 /// one marker drawn on the map. Note that RMMarker ultimately descends from CALayer, and has an image contents.
293aed8 @obrand69 Replaced UILabel with UIView to make it more generic
obrand69 authored
38 @interface RMMarker : RMMapLayer <RMMovingMapLayer> {
317bfb3 @halmueller more Doxygen tags
halmueller authored
39 /// (guess) the anchorPoint of the image is plotted here
293aed8 @obrand69 Replaced UILabel with UIView to make it more generic
obrand69 authored
40 RMXYPoint location;
be38264 @halmueller rearranged tile loading notifications in the demo app
halmueller authored
41
317bfb3 @halmueller more Doxygen tags
halmueller authored
42 /// provided for storage of arbitrary user data
43 NSObject* data;
293aed8 @obrand69 Replaced UILabel with UIView to make it more generic
obrand69 authored
44
317bfb3 @halmueller more Doxygen tags
halmueller authored
45 /// A label which comes up when you tap the marker
13339dd @halmueller added properties to interim RMMarker to allow direct setting of fore/…
halmueller authored
46 UIView *labelView;
47 UIColor *textForegroundColor;
48 UIColor *textBackgroundColor;
293aed8 @obrand69 Replaced UILabel with UIView to make it more generic
obrand69 authored
49 }
13339dd @halmueller added properties to interim RMMarker to allow direct setting of fore/…
halmueller authored
50 @property (assign, nonatomic) RMXYPoint location;
51 @property (nonatomic, retain) NSObject* data;
52 @property (nonatomic, retain) UIView* labelView;
53 @property(nonatomic,retain) UIColor *textForegroundColor;
54 @property(nonatomic,retain) UIColor *textBackgroundColor;
293aed8 @obrand69 Replaced UILabel with UIView to make it more generic
obrand69 authored
55
5cdde64 @halmueller Cleaned up a couple of accessor usages. Added many deprecation warnings.
halmueller authored
56 /// \deprecated Deprecated at any moment after 0.5.
293aed8 @obrand69 Replaced UILabel with UIView to make it more generic
obrand69 authored
57 + (RMMarker*) markerWithNamedStyle: (NSString*) styleName;
5cdde64 @halmueller Cleaned up a couple of accessor usages. Added many deprecation warnings.
halmueller authored
58 /// \deprecated Deprecated at any moment after 0.5.
293aed8 @obrand69 Replaced UILabel with UIView to make it more generic
obrand69 authored
59 + (CGImageRef) markerImage: (NSString *) key;
5cdde64 @halmueller Cleaned up a couple of accessor usages. Added many deprecation warnings.
halmueller authored
60 /// \deprecated Deprecated at any moment after 0.5.
293aed8 @obrand69 Replaced UILabel with UIView to make it more generic
obrand69 authored
61 + (CGImageRef) loadPNGFromBundle: (NSString *)filename;
62
63 - (id) initWithCGImage: (CGImageRef) image anchorPoint: (CGPoint) anchorPoint;
64 - (id) initWithCGImage: (CGImageRef) image;
ade2442 @halmueller minor edits, mostly to documentation
halmueller authored
65 /// \deprecated Deprecated at any moment after 0.5. Use initWithUIImage:.
293aed8 @obrand69 Replaced UILabel with UIView to make it more generic
obrand69 authored
66 - (id) initWithKey: (NSString*) key;
67 - (id) initWithUIImage: (UIImage*) image;
ade2442 @halmueller minor edits, mostly to documentation
halmueller authored
68 /// \deprecated Deprecated at any moment after 0.5. Use initWithUIImage:.
293aed8 @obrand69 Replaced UILabel with UIView to make it more generic
obrand69 authored
69 - (id) initWithStyle: (RMMarkerStyle*) style;
ade2442 @halmueller minor edits, mostly to documentation
halmueller authored
70 /// \deprecated Deprecated at any moment after 0.5. Use initWithUIImage:.
293aed8 @obrand69 Replaced UILabel with UIView to make it more generic
obrand69 authored
71 - (id) initWithNamedStyle: (NSString*) styleName;
72
73 - (void) setLabel: (UIView*)aView;
74 - (void) setTextLabel: (NSString*)text;
317bfb3 @halmueller more Doxygen tags
halmueller authored
75 /// \deprecated name change or deletion pending after 0.0
293aed8 @obrand69 Replaced UILabel with UIView to make it more generic
obrand69 authored
76 - (void) setTextLabel: (NSString*)text toPosition:(CGPoint)position;
317bfb3 @halmueller more Doxygen tags
halmueller authored
77 /// \deprecated name change or deletion pending after 0.0
d82c6c8 @tracyharton Add replaceKey: to mirrow replaceImage: for keys.
tracyharton authored
78 - (void) setTextLabel: (NSString*)text withFont:(UIFont*)font withTextColor:(UIColor*)textColor withBackgroundColor:(UIColor*)backgroundColor;
317bfb3 @halmueller more Doxygen tags
halmueller authored
79 /// \deprecated name change or deletion pending after 0.0
d82c6c8 @tracyharton Add replaceKey: to mirrow replaceImage: for keys.
tracyharton authored
80 - (void) setTextLabel: (NSString*)text toPosition:(CGPoint)position withFont:(UIFont*)font withTextColor:(UIColor*)textColor withBackgroundColor:(UIColor*)backgroundColor;
293aed8 @obrand69 Replaced UILabel with UIView to make it more generic
obrand69 authored
81 - (void) toggleLabel;
82 - (void) showLabel;
83 - (void) hideLabel;
84 - (void) removeLabel;
85
86 - (void) replaceImage:(CGImageRef)image anchorPoint:(CGPoint)_anchorPoint;
5cdde64 @halmueller Cleaned up a couple of accessor usages. Added many deprecation warnings.
halmueller authored
87 /// \deprecated Deprecated at any moment after 0.5.
d82c6c8 @tracyharton Add replaceKey: to mirrow replaceImage: for keys.
tracyharton authored
88 - (void) replaceKey: (NSString*) key;
89
5cdde64 @halmueller Cleaned up a couple of accessor usages. Added many deprecation warnings.
halmueller authored
90 /// \deprecated Deprecated at any moment after 0.4.
293aed8 @obrand69 Replaced UILabel with UIView to make it more generic
obrand69 authored
91 - (void) hide;
5cdde64 @halmueller Cleaned up a couple of accessor usages. Added many deprecation warnings.
halmueller authored
92 /// \deprecated Deprecated at any moment after 0.4.
293aed8 @obrand69 Replaced UILabel with UIView to make it more generic
obrand69 authored
93 - (void) unhide;
94
95 - (void) dealloc;
96
97 // Call this with either RMMarkerBlue or RMMarkerRed for the key.
5cdde64 @halmueller Cleaned up a couple of accessor usages. Added many deprecation warnings.
halmueller authored
98 /// \deprecated Deprecated at any moment after 0.5.
293aed8 @obrand69 Replaced UILabel with UIView to make it more generic
obrand69 authored
99 + (CGImageRef) markerImage: (NSString *) key;
100
101 @end
Something went wrong with that request. Please try again.