/
TiMapView.h
70 lines (56 loc) 路 1.93 KB
/
TiMapView.h
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
59
60
61
62
63
64
65
66
67
68
69
70
/**
* Appcelerator Titanium Mobile
* Copyright (c) 2009-2010 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*/
#import "TiBase.h"
#ifdef USE_TI_MAP
#import "TiUIView.h"
#import <MapKit/MapKit.h>
@class TiMapAnnotationProxy;
@protocol TiMapAnnotation
@required
-(NSString *)lastHitName;
@end
@interface TiMapView : TiUIView<MKMapViewDelegate> {
@private
MKMapView *map;
BOOL regionFits;
BOOL animate;
BOOL loaded;
BOOL ignoreClicks;
MKCoordinateRegion region;
// routes
// dictionaries for object tracking and association
CFMutableDictionaryRef mapLine2View; // MKPolyline(route line) -> MKPolylineView(route view)
CFMutableDictionaryRef mapName2Line; // NSString(name) -> MKPolyline(route line)
// Click detection
id<MKAnnotation> hitAnnotation;
BOOL hitSelect;
BOOL manualSelect;
}
@property (nonatomic, readonly) CLLocationDegrees longitudeDelta;
@property (nonatomic, readonly) CLLocationDegrees latitudeDelta;
@property (nonatomic, readonly) NSArray *customAnnotations;
#pragma mark Private APIs
-(TiMapAnnotationProxy*)annotationFromArg:(id)arg;
-(NSArray*)annotationsFromArgs:(id)value;
#pragma mark Public APIs
-(void)addAnnotation:(id)args;
-(void)addAnnotations:(id)args;
-(void)setAnnotations_:(id)value;
-(void)removeAnnotation:(id)args;
-(void)removeAnnotations:(id)args;
-(void)removeAllAnnotations:(id)args;
-(void)selectAnnotation:(id)args;
-(void)deselectAnnotation:(id)args;
-(void)zoom:(id)args;
-(void)addRoute:(id)args;
-(void)removeRoute:(id)args;
-(void)firePinChangeDragState:(MKAnnotationView *) pinview newState:(MKAnnotationViewDragState)newState fromOldState:(MKAnnotationViewDragState)oldState;
#pragma mark Framework
-(void)refreshAnnotation:(TiMapAnnotationProxy*)proxy readd:(BOOL)yn;
-(void)fireClickEvent:(MKAnnotationView *) pinview source:(NSString *)source;
@end
#endif