motion-yandexmapkit 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. data/.gitignore +18 -0
  2. data/Gemfile +4 -0
  3. data/LICENSE +26 -0
  4. data/README.md +36 -0
  5. data/Rakefile +2 -0
  6. data/YandexMapKit/Headers/YMKAnnotation.h +34 -0
  7. data/YandexMapKit/Headers/YMKAnnotationView.h +150 -0
  8. data/YandexMapKit/Headers/YMKCalloutContentView-Protocol.h +30 -0
  9. data/YandexMapKit/Headers/YMKCalloutView.h +61 -0
  10. data/YandexMapKit/Headers/YMKDraggableAnnotation.h +25 -0
  11. data/YandexMapKit/Headers/YMKDraggablePinAnnotationView.h +47 -0
  12. data/YandexMapKit/Headers/YMKDraggablePinAnnotationViewDelegate+Protocol.h +41 -0
  13. data/YandexMapKit/Headers/YMKGeoObject.h +26 -0
  14. data/YandexMapKit/Headers/YMKHostsConfiguration.h +30 -0
  15. data/YandexMapKit/Headers/YMKMapLayerInfo.h +57 -0
  16. data/YandexMapKit/Headers/YMKMapLayersConfiguration.h +50 -0
  17. data/YandexMapKit/Headers/YMKMapStructs.h +507 -0
  18. data/YandexMapKit/Headers/YMKMapView.h +278 -0
  19. data/YandexMapKit/Headers/YMKMapViewConfiguration.h +31 -0
  20. data/YandexMapKit/Headers/YMKMapViewDelegate+Protocol.h +134 -0
  21. data/YandexMapKit/Headers/YMKPinAnnotationView.h +47 -0
  22. data/YandexMapKit/Headers/YMKRuler.h +30 -0
  23. data/YandexMapKit/Headers/YMKTrafficInformer.h +58 -0
  24. data/YandexMapKit/Headers/YMKUserLocation.h +51 -0
  25. data/YandexMapKit/Headers/YandexMapKit.h +19 -0
  26. data/YandexMapKit/YandexMapKit.bundle/en.lproj/Localizable.strings +146 -0
  27. data/YandexMapKit/YandexMapKit.bundle/en.lproj/TileUnavailable.png +0 -0
  28. data/YandexMapKit/YandexMapKit.bundle/en.lproj/TileUnavailable@2x.png +0 -0
  29. data/YandexMapKit/YandexMapKit.bundle/en.lproj/TileUnavailable~ipad.png +0 -0
  30. data/YandexMapKit/YandexMapKit.bundle/en.lproj/YMKBlueBalloon.png +0 -0
  31. data/YandexMapKit/YandexMapKit.bundle/en.lproj/YMKBlueBalloon@2x.png +0 -0
  32. data/YandexMapKit/YandexMapKit.bundle/en.lproj/YMKBlueBalloonCommercial.png +0 -0
  33. data/YandexMapKit/YandexMapKit.bundle/en.lproj/YMKBlueBalloonCommercial@2x.png +0 -0
  34. data/YandexMapKit/YandexMapKit.bundle/en.lproj/YMKCalloutBaloon.png +0 -0
  35. data/YandexMapKit/YandexMapKit.bundle/en.lproj/YMKCalloutBaloon@2x.png +0 -0
  36. data/YandexMapKit/YandexMapKit.bundle/en.lproj/YMKCalloutStem.png +0 -0
  37. data/YandexMapKit/YandexMapKit.bundle/en.lproj/YMKCalloutStem@2x.png +0 -0
  38. data/YandexMapKit/YandexMapKit.bundle/en.lproj/YMKCurrentRouteStepNode.png +0 -0
  39. data/YandexMapKit/YandexMapKit.bundle/en.lproj/YMKCurrentRouteStepNode@2x.png +0 -0
  40. data/YandexMapKit/YandexMapKit.bundle/en.lproj/YMKDraggableBlueBalloon.png +0 -0
  41. data/YandexMapKit/YandexMapKit.bundle/en.lproj/YMKGreenBalloon.png +0 -0
  42. data/YandexMapKit/YandexMapKit.bundle/en.lproj/YMKGreenBalloon@2x.png +0 -0
  43. data/YandexMapKit/YandexMapKit.bundle/en.lproj/YMKRouteMarkerBus.png +0 -0
  44. data/YandexMapKit/YandexMapKit.bundle/en.lproj/YMKRouteMarkerBus@2x.png +0 -0
  45. data/YandexMapKit/YandexMapKit.bundle/en.lproj/YMKRouteMarkerMetro.png +0 -0
  46. data/YandexMapKit/YandexMapKit.bundle/en.lproj/YMKRouteMarkerMetro@2x.png +0 -0
  47. data/YandexMapKit/YandexMapKit.bundle/en.lproj/YMKRouteNode.png +0 -0
  48. data/YandexMapKit/YandexMapKit.bundle/en.lproj/YMKRouteNode@2x.png +0 -0
  49. data/YandexMapKit/YandexMapKit.bundle/en.lproj/YMUserLocationMarkerView.png +0 -0
  50. data/YandexMapKit/YandexMapKit.bundle/en.lproj/YMUserLocationMarkerView@2x.png +0 -0
  51. data/YandexMapKit/YandexMapKit.bundle/en.lproj/YMUserLocationMarkerViewDirection.png +0 -0
  52. data/YandexMapKit/YandexMapKit.bundle/en.lproj/YMUserLocationMarkerViewDirection@2x.png +0 -0
  53. data/YandexMapKit/YandexMapKit.bundle/ru.lproj/Localizable.strings +143 -0
  54. data/YandexMapKit/YandexMapKit.bundle/ru.lproj/TileUnavailable.png +0 -0
  55. data/YandexMapKit/YandexMapKit.bundle/ru.lproj/TileUnavailable@2x.png +0 -0
  56. data/YandexMapKit/YandexMapKit.bundle/ru.lproj/TileUnavailable~ipad.png +0 -0
  57. data/YandexMapKit/YandexMapKit.bundle/ru.lproj/YMUserLocationMarkerView.png +0 -0
  58. data/YandexMapKit/YandexMapKit.bundle/ru.lproj/YMUserLocationMarkerView@2x.png +0 -0
  59. data/YandexMapKit/YandexMapKit.bundle/ru.lproj/YMUserLocationMarkerViewDirection.png +0 -0
  60. data/YandexMapKit/YandexMapKit.bundle/ru.lproj/YMUserLocationMarkerViewDirection@2x.png +0 -0
  61. data/YandexMapKit/YandexMapKit.bundle/tr.lproj/Localizable.strings +141 -0
  62. data/YandexMapKit/YandexMapKit.bundle/tr.lproj/TileUnavailable.png +0 -0
  63. data/YandexMapKit/YandexMapKit.bundle/tr.lproj/TileUnavailable@2x.png +0 -0
  64. data/YandexMapKit/YandexMapKit.bundle/tr.lproj/TileUnavailable~ipad.png +0 -0
  65. data/YandexMapKit/YandexMapKit.bundle/tr.lproj/YMUserLocationMarkerView.png +0 -0
  66. data/YandexMapKit/YandexMapKit.bundle/tr.lproj/YMUserLocationMarkerView@2x.png +0 -0
  67. data/YandexMapKit/YandexMapKit.bundle/tr.lproj/YMUserLocationMarkerViewDirection.png +0 -0
  68. data/YandexMapKit/YandexMapKit.bundle/tr.lproj/YMUserLocationMarkerViewDirection@2x.png +0 -0
  69. data/YandexMapKit/YandexMapKit.bundle/uk.lproj/Localizable.strings +141 -0
  70. data/YandexMapKit/YandexMapKit.bundle/uk.lproj/TileUnavailable.png +0 -0
  71. data/YandexMapKit/YandexMapKit.bundle/uk.lproj/TileUnavailable@2x.png +0 -0
  72. data/YandexMapKit/YandexMapKit.bundle/uk.lproj/TileUnavailable~ipad.png +0 -0
  73. data/YandexMapKit/YandexMapKit.bundle/uk.lproj/YMUserLocationMarkerView.png +0 -0
  74. data/YandexMapKit/YandexMapKit.bundle/uk.lproj/YMUserLocationMarkerView@2x.png +0 -0
  75. data/YandexMapKit/YandexMapKit.bundle/uk.lproj/YMUserLocationMarkerViewDirection.png +0 -0
  76. data/YandexMapKit/YandexMapKit.bundle/uk.lproj/YMUserLocationMarkerViewDirection@2x.png +0 -0
  77. data/YandexMapKit/libYandexMapKit.a +0 -0
  78. data/lib/motion-yandexmapkit.rb +23 -0
  79. data/lib/motion-yandexmapkit/version.rb +5 -0
  80. data/motion-yandexmapkit.gemspec +17 -0
  81. metadata +126 -0
@@ -0,0 +1,278 @@
1
+ /*
2
+ * YMKMapView.h Map View class interface
3
+ *
4
+ * This file is a part of the Yandex Map Kit.
5
+ *
6
+ * Version for iOS © 2011 YANDEX
7
+ *
8
+ * You may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at http://legal.yandex.ru/mapkit/
10
+ */
11
+
12
+ #import <CoreLocation/CoreLocation.h>
13
+ #import <Foundation/Foundation.h>
14
+
15
+ #import "YMKAnnotation.h"
16
+ #import "YMKAnnotationView.h"
17
+ #import "YMKMapStructs.h"
18
+ #import "YMKMapViewConfiguration.h"
19
+ #import "YMKMapViewDelegate+Protocol.h"
20
+ #import "YMKUserLocation.h"
21
+
22
+ /**
23
+ Provides a map interface for displaying and programmatically controlling Yandex Maps.
24
+ @see http://developer.apple.com/library/ios/#documentation/MapKit/Reference/MKMapView_Class/MKMapView/MKMapView.html
25
+ */
26
+ @interface YMKMapView : UIView
27
+
28
+ /**
29
+ Contains Yandex Map Kit API of your application. Map view won't start load
30
+ map tiles without it.
31
+ */
32
+ @property (nonatomic, copy) NSString * apiKey;
33
+
34
+ /**
35
+ Defines the map view delegate.
36
+ The delegate receives messages about map loading and updating and also controls annotation views.
37
+ */
38
+ @property (nonatomic, assign) IBOutlet id<YMKMapViewDelegate> delegate;
39
+
40
+ /**
41
+ Contains current map view configuration such as map layers.
42
+ */
43
+ @property (nonatomic, readonly) YMKMapViewConfiguration * configuration;
44
+
45
+ /**
46
+ Identifier of a visible map layer.
47
+ */
48
+ @property (nonatomic, assign) uint16_t visibleLayerIdentifier;
49
+
50
+ /**
51
+ The area which is currently displayed in the map view.
52
+ */
53
+ @property (nonatomic, assign) YMKMapRegion region;
54
+
55
+ /**
56
+ The geographical coordinate of the center of the map view.
57
+ */
58
+ @property (nonatomic, assign) CLLocationCoordinate2D centerCoordinate;
59
+
60
+ /**
61
+ The coordinates of the map center.
62
+ */
63
+ @property (nonatomic, assign) YMKMapPoint centerMapPoint;
64
+
65
+ /**
66
+ The current map zoom level.
67
+ */
68
+ @property (nonatomic, readonly) NSUInteger zoomLevel;
69
+
70
+ /**
71
+ The list of annotations corresponding to the map view.
72
+ */
73
+ @property (nonatomic, readonly) NSArray * annotations;
74
+
75
+ /**
76
+ The current view port is being displayed
77
+ */
78
+ @property (nonatomic, readonly) YMKMapViewPort viewPort;
79
+
80
+ /**
81
+ The current map view scale defined as meters per 100px.
82
+ */
83
+ @property (nonatomic, assign, readonly) double scale;
84
+
85
+ /**
86
+ The annotation which is currently selected.
87
+ */
88
+ @property (nonatomic, retain) id<YMKAnnotation> selectedAnnotation;
89
+
90
+ /**
91
+ The current user location.
92
+ */
93
+ @property (nonatomic, readonly) YMKUserLocation * userLocation;
94
+
95
+ /**
96
+ Specifies if the user location is visible on the map view.
97
+ */
98
+ @property (nonatomic, readonly) BOOL userLocationVisible;
99
+
100
+ /**
101
+ Specifies if the map view is allowed to display the user location.
102
+ */
103
+ @property (nonatomic, assign) BOOL showsUserLocation;
104
+
105
+ /**
106
+ Specifies if the map view is allowed to track the user location.
107
+ */
108
+ @property (nonatomic, assign) BOOL tracksUserLocation;
109
+
110
+ /**
111
+ Specifies if the map view displays traffic congestion.
112
+ */
113
+ @property (nonatomic, assign) BOOL showTraffic;
114
+
115
+ /**
116
+ Specifies if the map view displays "dead" traffic jams.
117
+ */
118
+ @property (nonatomic, assign) BOOL showDeadJams;
119
+
120
+ /**
121
+ The list of traffic informers that is available in current visible region
122
+ */
123
+ @property (nonatomic, copy, readonly) NSArray * trafficInformers;
124
+
125
+ @property (nonatomic, assign, readonly) BOOL fetchingJams;
126
+ // routes
127
+ @property (nonatomic, assign) BOOL showRoute;
128
+ // rotation
129
+ @property (nonatomic, assign) CGFloat angle; // map rotation angle from 0 to 2pi
130
+ @property (nonatomic, assign) BOOL canUseCompass; // unimplemented yet, compass is always used when available by now
131
+
132
+ /**
133
+ Toggles night mode of the map
134
+ */
135
+ @property (nonatomic, assign) BOOL nightMode;
136
+
137
+ /**
138
+ Moves the map center to the point with the specified coordinates (with or without animation).
139
+ @param coordinate the screen coordinates of the new map center
140
+ @param animated YES - to use animation while moving to the new center, NO - not
141
+ */
142
+ - (void)setCenterCoordinate:(CLLocationCoordinate2D)coordinate animated:(BOOL)animated;
143
+
144
+ /**
145
+ Changes the region displayed in the view (with or without animation).
146
+ @param region the new region to be displayed in the view
147
+ @param animated YES - to use animation while moving to the new region, NO - not
148
+ */
149
+ - (void)setRegion:(YMKMapRegion)region animated:(BOOL)animated;
150
+
151
+ /**
152
+ Moves the map center to the point with the specified coordinates at the specified zoom level (with or without animation).
153
+ @param coordinate the screen coordinates of the new map center
154
+ @param zoomLevel specifies a new zoom level
155
+ @param animated YES - to use animation while moving to the new center, NO - not
156
+ */
157
+ - (void)setCenterCoordinate:(CLLocationCoordinate2D)coordinate atZoomLevel:(NSUInteger)zoomLevel animated:(BOOL)animated;
158
+
159
+ /**
160
+ Returns a reusable annotation view located by its identifier.
161
+ @param identifier the id of the reusable annotation view
162
+ @return the specified reusable annotation view
163
+ */
164
+ - (id)dequeueReusableAnnotationViewWithIdentifier:(NSString *)identifier;
165
+
166
+ /**
167
+ Returns a reusable callout view located by its identifier.
168
+ @param identifier the id of the reusable callout view
169
+ @return the specified reusable callout view
170
+ */
171
+ - (id)dequeueReusableCalloutViewWithIdentifier:(NSString *)identifier;
172
+
173
+ /**
174
+ Adds the specified annotation to the map view.
175
+ @param annotation specifies the annotation object
176
+ */
177
+ - (void)addAnnotation:(id<YMKAnnotation>)annotation;
178
+
179
+ /**
180
+ Adds the list of annotations to the map view.
181
+ @param annotations specifies the list of annotation objects
182
+ */
183
+ - (void)addAnnotations:(NSArray *)annotations;
184
+
185
+ /**
186
+ Removes the specified annotation from the map view.
187
+ @param annotation specifies the annotation object
188
+ */
189
+ - (void)removeAnnotation:(id<YMKAnnotation>)annotation;
190
+
191
+ /**
192
+ Removes the specified annotations from the map view.
193
+ @param annotations the list of annotations to be removed
194
+ */
195
+ - (void)removeAnnotations:(NSArray*)annotations;
196
+
197
+ /**
198
+ Scrolls Map so specified annotation view becomes visible.
199
+ @param annotationView Specifies the annotation object
200
+ @param animated Indicates whether mapview should animate scrolling or not.
201
+ */
202
+ - (void)scrollToAnnotationView:(YMKAnnotationView *)annotationView animated:(BOOL)animated;
203
+
204
+ /**
205
+ Returns the annotation view corresponding to the specified annotation object.
206
+ @param annotation specifies the annotation object
207
+ @return the annotation view corresponding to the specified annotation object
208
+ */
209
+ - (YMKAnnotationView *)viewForAnnotation:(id<YMKAnnotation>)annotation;
210
+
211
+ /**
212
+ Converts a point with geographical coordinates to a point with screen coordinates.
213
+ @param coord the point with geographical coordinates (latitude, longitude)
214
+ @return the point with screen coordinates
215
+ */
216
+ - (CGPoint)convertLLToMapView:(CLLocationCoordinate2D)coord;
217
+
218
+ /**
219
+ Converts a point with screen coordinates to a point with geographical coordinates.
220
+ @param point the point with screen coordinates (in pixels)
221
+ @return the point with geographical coordinates (latitude, longitude)
222
+ */
223
+ - (CLLocationCoordinate2D)convertMapViewPointToLL:(CGPoint)point;
224
+
225
+ /**
226
+ Converts geographical coordinates into screen coordinates
227
+ @param point the point with geographical coordinates
228
+ @return the point with screen coordinates
229
+ */
230
+ - (CGPoint)convertMapPointToMapView:(YMKMapPoint)point;
231
+
232
+ /**
233
+ Converts screen coordinates to geographical coordinates
234
+ @param point the point with screen coordinates
235
+ @return the point with geographical coordinates
236
+ */
237
+ - (YMKMapPoint)convertMapViewPointToMapPoint:(CGPoint)point;
238
+
239
+ /**
240
+ Returns a region which preserves the aspect ratio of the map view and its center point and contains the specified region.
241
+ @param region specifies the region
242
+ @return a region which preserves the aspect ratio of the map view and its center point and contains the specified region
243
+ */
244
+ - (YMKMapRegion)fitRegion:(YMKMapRegion)region;
245
+
246
+ /**
247
+ Sets map rotation angle
248
+ */
249
+ - (void)setAngle:(CGFloat)angle animated:(BOOL)animated;
250
+
251
+ /**
252
+ Dismisses location heading calibration UI
253
+ */
254
+ - (void)dismissHeadingCalibrationDisplay;
255
+
256
+ /**
257
+ Calculates cache size of map view
258
+ */
259
+ + (unsigned long long)calculateCacheSize:(NSError**)error; // blocks until calculated
260
+
261
+ /**
262
+ Clears map cache
263
+ */
264
+ + (void)clearCache; // blocks until cleared
265
+
266
+ /**
267
+ Zoom In.
268
+ If user location is available, zooms in over the location. Otherwise, zooms in on the center of the map view.
269
+ */
270
+ - (void)zoomIn;
271
+
272
+ /**
273
+ Zoom Out.
274
+ If user location is available, zooms out over the location. Otherwise, zooms out on the center of the map view.
275
+ */
276
+ - (void)zoomOut;
277
+
278
+ @end
@@ -0,0 +1,31 @@
1
+ /*
2
+ * YMKMapViewConfig.h
3
+ *
4
+ * This file is a part of the Yandex Map Kit.
5
+ *
6
+ * Version for iOS © 2011 YANDEX
7
+ *
8
+ * You may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at http://legal.yandex.ru/mapkit/
10
+ */
11
+
12
+ #import <Foundation/Foundation.h>
13
+
14
+ #import "YMKHostsConfiguration.h"
15
+ #import "YMKMapLayersConfiguration.h"
16
+
17
+
18
+ @interface YMKMapViewConfiguration : NSObject {
19
+ @private
20
+ NSString * uuid_;
21
+ YMKHostsConfiguration * hosts_;
22
+ YMKMapLayersConfiguration * mapLayers_;
23
+ }
24
+
25
+ @property (nonatomic, copy, readonly) NSString * uuid;
26
+ @property (nonatomic, retain, readonly) YMKHostsConfiguration * hosts;
27
+ @property (nonatomic, retain, readonly) YMKMapLayersConfiguration * mapLayers;
28
+
29
+ - (void)setContentsFrom:(YMKMapViewConfiguration *)configuration;
30
+
31
+ @end
@@ -0,0 +1,134 @@
1
+ /*
2
+ * YMKMapViewDelegate+Protocol.h
3
+ *
4
+ * This file is a part of the Yandex Map Kit.
5
+ *
6
+ * Version for iOS © 2011 YANDEX
7
+ *
8
+ * You may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at http://legal.yandex.ru/mapkit/
10
+ */
11
+
12
+
13
+ #import <Foundation/Foundation.h>
14
+ #import <UIKit/UIKit.h>
15
+
16
+ @class YMKMapView;
17
+ @class YMKCalloutView;
18
+
19
+ /**
20
+ Defines methods which the YMKMapView class uses to inform your application that a
21
+ particular map-related operation is complete.
22
+ @see http://developer.apple.com/library/ios/#documentation/MapKit/Reference/MKMapViewDelegate_Protocol/MKMapViewDelegate/MKMapViewDelegate.html
23
+ */
24
+ @protocol YMKMapViewDelegate <NSObject>
25
+
26
+ @optional
27
+
28
+ /**
29
+ Returns the view corresponding to the specified annotation object.
30
+ @param mapView the map view which has requested the annotation
31
+ @param annotation the object corresponding to the annotation you want to be displayed
32
+ @return the view corresponding to the specified annotation object
33
+ */
34
+ - (YMKAnnotationView *)mapView:(YMKMapView *)mapView viewForAnnotation:(id<YMKAnnotation>)annotation;
35
+
36
+ /**
37
+ Returns the callout view (baloon) corresponding to the specified annotation object.
38
+ @param mapView the map view which has requested the annotation
39
+ @param annotation the object corresponding to the annotation you want to be displayed
40
+ @return the callout view corresponding to the specified annotation object
41
+ */
42
+ - (YMKCalloutView *)mapView:(YMKMapView *)view calloutViewForAnnotation:(id<YMKAnnotation>)annotation;
43
+
44
+ /**
45
+ Informs the delegate that the user has tapped an accessory control of the annotation view callout.
46
+ @param mapView the map view containing the specified annotation view
47
+ @param view the annotation view containing the callout with the control that was tapped
48
+ @param control the tapped control
49
+ */
50
+ - (void)mapView:(YMKMapView *)mapView annotationView:(YMKAnnotationView *)view calloutAccessoryControlTapped:(UIControl *)control;
51
+
52
+ /**
53
+ Informs the delegate that the user has tapped the annotation view callout.
54
+ @param mapView the map view containing the specified annotation view
55
+ @param view the annotation view containing the callout which has been tapped
56
+ */
57
+ - (void)mapView:(YMKMapView *)mapView annotationViewCalloutTapped:(YMKAnnotationView *)view;
58
+
59
+ /**
60
+ Informs the map view delegate that given annotation views were added to map
61
+ @param mapView mapView the map view containing specified annotation views
62
+ @param views list of annotation views that have been added to the map
63
+ */
64
+ - (void)mapView:(YMKMapView *)mapView didAddAnnotationViews:(NSArray *)views;
65
+
66
+ /**
67
+ Informs the view delegate that the region displayed by the view has been changed.
68
+ @param mapView the map view where the displayed region has changed
69
+ @param animated indicates whether the view change has been animated
70
+ */
71
+ - (void)mapView:(YMKMapView *)mapView regionDidChangeAnimated:(BOOL)animated;
72
+
73
+ /**
74
+ Informs the view delegate that the region displayed on the map will be changed.
75
+ @param mapView the map view where the displayed region is about to change
76
+ @param animated indicates whether the region change will be animated
77
+ */
78
+ - (void)mapView:(YMKMapView *)mapView regionWillChangeAnimated:(BOOL)animated;
79
+
80
+ /**
81
+ Informs the view delegate that the specified map view has been dragged.
82
+ @param mapView the map view which has been dragged
83
+ */
84
+ - (void)mapViewWasDragged:(YMKMapView *)mapView;
85
+
86
+ /**
87
+ Asks the view delegate if the map view should follow the user location.
88
+ @param mapView specifies the map view
89
+ @return YES - the map view should follow the user location, NO - not
90
+ */
91
+ - (BOOL)mapViewShouldFollowUserLocation:(YMKMapView *)mapView;
92
+
93
+ /**
94
+ Asks the view delegate if the map view should display the heading calibration alert.
95
+ @param mapView specifies the map view
96
+ @return YES - the heading calibration alert should be displayed, NO - not
97
+ */
98
+ - (BOOL)mapViewShouldDisplayHeadingCalibration:(YMKMapView *)mapView;
99
+
100
+ /**
101
+ Informs the view delegate that the location manager failed to retrieve the user's location.
102
+ @param mapView specifies the map view
103
+ @param error the error object containing the error description
104
+ */
105
+ - (void)mapView:(YMKMapView *)mapView locationManagerReceivedError:(NSError *)error;
106
+
107
+ /**
108
+ Informs the view delegate that the user has tapped a point on the screen.
109
+ @param mapView specifies the view which is being tapped
110
+ @param coordinate the geographical coordinates of the point being tapped
111
+ */
112
+ - (void)mapView:(YMKMapView *)mapView gotSingleTapAtCoordinate:(CLLocationCoordinate2D)coordinate;
113
+
114
+ /**
115
+ Informs the view delegate that the user has tapped and held at a point on the screen.
116
+ @param mapView specifies the view which is being tapped and held
117
+ @param coordinate the geographical coordinates of the point being tapped and held
118
+ */
119
+ - (void)mapView:(YMKMapView *)mapView gotTapAndHoldAtCoordinate:(CLLocationCoordinate2D)coordinate;
120
+
121
+ /**
122
+ Informs the map view delegate when map view did reset rotation angle
123
+ @param mapView specifies the map view which has been reset rotation angle
124
+ */
125
+ - (void)mapViewDidResetRotationAngle:(YMKMapView *)mapView;
126
+
127
+ /**
128
+ Asks the map view delegate of visible map view rect in screen coordinates.
129
+ @param mapView specifies the map view which is being evaluated
130
+ @return frame visible rect frame
131
+ */
132
+ - (CGRect)mapViewVisibleRect:(YMKMapView *)mapView;
133
+
134
+ @end
@@ -0,0 +1,47 @@
1
+ /*
2
+ * YMKPinAnnotationView.h
3
+ *
4
+ * This file is a part of the Yandex Map Kit.
5
+ *
6
+ * Version for iOS © 2011 YANDEX
7
+ *
8
+ * You may not use this file except in compliance with the License.
9
+ * You may obtain a copy of the License at http://legal.yandex.ru/mapkit/
10
+ */
11
+
12
+ #import <Foundation/Foundation.h>
13
+ #import "YMKAnnotationView.h"
14
+
15
+ /**
16
+ The supported colors for pin annotations
17
+ */
18
+ enum {
19
+ YMKPinAnnotationColorBlue = 0, /**< The head of the pin is blue */
20
+ YMKPinAnnotationColorGreen, /**< The head of the pin is green */
21
+ YMKPinAnnotationColorBlueCommercial /**< The head of the pin is blue with a yellow star */
22
+ };
23
+ typedef NSUInteger YMKPinAnnotationColor;
24
+
25
+ /**
26
+ The YMKPinAnnotationView class provides a concrete annotation view that displays a pin icon.
27
+ Using this class, you can configure the type of pin to drop and whether you
28
+ want the pin to be animated into place.
29
+ */
30
+ @interface YMKPinAnnotationView : YMKAnnotationView {
31
+ @private
32
+ id _pinInternal;
33
+ BOOL _animatesDrop;
34
+ YMKPinAnnotationColor _pinColor;
35
+ }
36
+
37
+ /**
38
+ Specifies whether pin annotation view should be animated upon adding to the map
39
+ */
40
+ @property (nonatomic, assign) BOOL animatesDrop;
41
+
42
+ /**
43
+ Specifies pin color
44
+ */
45
+ @property (nonatomic, assign) YMKPinAnnotationColor pinColor;
46
+
47
+ @end