motion-yandexmapkit 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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,41 @@
1
+ /*
2
+ * YMKDraggablePinAnnotationViewDelegate+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
+ #import <Foundation/Foundation.h>
13
+
14
+ @class YMKDraggablePinAnnotationView;
15
+
16
+ /**
17
+ Provides information about draggable pin annotations to a map view.
18
+ */
19
+ @protocol YMKDraggablePinAnnotationViewDelegate <NSObject>
20
+
21
+ @optional
22
+
23
+ /**
24
+ Called when user did start interation with the pin annotation view
25
+ @param pin annotation view is being interacted
26
+ */
27
+ - (void)draggablePinAnnotationViewDidStartInteraction:(YMKDraggablePinAnnotationView *)view;
28
+
29
+ /**
30
+ Called when user did start moving the pin annotation view
31
+ @param pin annotation view is being moved
32
+ */
33
+ - (void)draggablePinAnnotationViewDidStartMoving:(YMKDraggablePinAnnotationView *)view;
34
+
35
+ /**
36
+ Called when user did end moving the pin annotation view
37
+ @param pin annotation view is being moved
38
+ */
39
+ - (void)draggablePinAnnotationViewDidEndMoving:(YMKDraggablePinAnnotationView *)view;
40
+
41
+ @end
@@ -0,0 +1,26 @@
1
+ /*
2
+ * YMKGeoObject.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 <CoreLocation/CoreLocation.h>
13
+ #import <Foundation/Foundation.h>
14
+
15
+ /**
16
+ Defines generic geographical object
17
+ */
18
+ @protocol YMKGeoObject <NSObject>
19
+ @required
20
+
21
+ /**
22
+ The map coordinates of the center point of an object.
23
+ */
24
+ @property (nonatomic, readonly) CLLocationCoordinate2D coordinate;
25
+
26
+ @end
@@ -0,0 +1,30 @@
1
+ /*
2
+ * YMKHostsConfiguration.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
+ @interface YMKHostsConfiguration : NSObject {
15
+ @private
16
+ NSString * startupURLString_;
17
+ NSString * tileRequestURLString_;
18
+ NSString * jamsRequestURLString_;
19
+ NSString * jamStylesURLString_;
20
+ NSString * routeBuilderURLString_;
21
+ NSString * ymapsmlStylesURLString_;
22
+ }
23
+ @property (nonatomic, readonly, copy) NSString * startupURLString;
24
+ @property (nonatomic, readonly, copy) NSString * tileRequestURLString;
25
+ @property (nonatomic, readonly, copy) NSString * jamsRequestURLString;
26
+ @property (nonatomic, readonly, copy) NSString * jamStylesURLString;
27
+ @property (nonatomic, readonly, copy) NSString * routeBuilderURLString;
28
+ @property (nonatomic, readonly, copy) NSString * ymapsmlStylesURLString;
29
+
30
+ @end
@@ -0,0 +1,57 @@
1
+ /*
2
+ * YMKMapLayerInfo.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
+ #include <stdint.h>
14
+
15
+ /**
16
+ An instance of YMKMapLayerInfo stores information about map layer supported
17
+ by map view.
18
+ */
19
+ @interface YMKMapLayerInfo : NSObject {
20
+ @private
21
+ uint16_t _identifier;
22
+ NSString * _requestString;
23
+ NSString * _localizedName;
24
+ BOOL _hasVersion;
25
+ uint16_t _currentVersion;
26
+ BOOL _auxiliary;
27
+ uint16_t _sizeInPixels;
28
+ BOOL _allowsNightMode;
29
+ }
30
+
31
+ /**
32
+ Layer identifier
33
+ */
34
+ @property (nonatomic, assign) uint16_t identifier;
35
+
36
+ /**
37
+ Localized name of a layer. You can use it in layer switching UI
38
+ */
39
+ @property (nonatomic, copy) NSString * localizedName;
40
+
41
+ /**
42
+ Boolean flag indicating service map layer with various meta information.
43
+ */
44
+ @property (nonatomic, assign) BOOL auxiliary;
45
+
46
+ /**
47
+ Size of a map layer tile in pixels.
48
+ */
49
+ @property (nonatomic, assign) uint16_t sizeInPixels;
50
+
51
+ /**
52
+ Boolean flag indicating whether map layer supports night mode. For example,
53
+ satellite layer doesn't support nigt mode.
54
+ */
55
+ @property (nonatomic, assign) BOOL allowsNightMode;
56
+
57
+ @end
@@ -0,0 +1,50 @@
1
+ /*
2
+ * YMKMapLayersConfig.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 "YMKMapLayerInfo.h"
14
+
15
+ /**
16
+ Provides information about map layers supported by map view
17
+ */
18
+ @interface YMKMapLayersConfiguration : NSObject {
19
+ @private
20
+ NSArray * _infos;
21
+ BOOL _hasServiceLayer;
22
+ YMKMapLayerInfo * _serviceLayerInfo;
23
+ }
24
+
25
+ /**
26
+ Contains instances of YMKMapLayerInfo supported by map view. You should query
27
+ this array manually.
28
+ @see infoForLayerWithIdentifier:
29
+ */
30
+ @property (nonatomic, readonly) NSArray * infos;
31
+
32
+ /**
33
+ Indicates whether current configuration contains auxillary map layer
34
+ */
35
+ @property (nonatomic, readonly) BOOL hasServiceLayer;
36
+
37
+ /**
38
+ If hasServiceLayer property is set to YES then serviceLayerInfo
39
+ points to auxillary map layer info
40
+ */
41
+ @property (nonatomic, readonly) YMKMapLayerInfo * serviceLayerInfo;
42
+
43
+ /**
44
+ Returns instance of YMKMapLayerInfo whose identifier is equal to parameter passed
45
+ @param identifier identifier of a requested map layer info
46
+ @return instance of YMKMapLayerInfo or nil
47
+ */
48
+ - (YMKMapLayerInfo *)infoForLayerWithIdentifier:(uint16_t)identifier;
49
+
50
+ @end
@@ -0,0 +1,507 @@
1
+ /*
2
+ * YMKMapStructs.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 <CoreLocation/CoreLocation.h>
15
+
16
+ #ifdef __cplusplus
17
+ extern "C" {
18
+ #endif
19
+
20
+ typedef CLLocationCoordinate2D YMKMapCoordinate;
21
+ typedef CLLocationDegrees YMKMapDegrees;
22
+
23
+ extern const YMKMapDegrees kYMKMapStructsComparisonAccuracy;
24
+ extern const YMKMapDegrees kYMKMapStructsCoordinateLatitudeMinValue;
25
+ extern const YMKMapDegrees kYMKMapStructsCoordinateLatitudeMaxValue;
26
+ extern const YMKMapDegrees kYMKMapStructsCoordinateLongitudeMinValue;
27
+ extern const YMKMapDegrees kYMKMapStructsCoordinateLongitudeMaxValue;
28
+ extern const YMKMapDegrees kYMKMapRegionSizeDeltaLatitudeMinValue;
29
+ extern const YMKMapDegrees kYMKMapRegionSizeDeltaLatitudeMaxValue;
30
+ extern const YMKMapDegrees kYMKMapRegionSizeDeltaLongitudeMinValue;
31
+ extern const YMKMapDegrees kYMKMapRegionSizeDeltaLongitudeMaxValue;
32
+
33
+ typedef enum {
34
+ YMKMapTypeInvalid = 0,
35
+ YMKMapTypeMap = 1,
36
+ YMKMapTypeSattelite = 2,
37
+ YMKMapTypeWiki = 3,
38
+ YMKMapTypeHybrid = 4
39
+ } YMKMapType DEPRECATED_ATTRIBUTE;
40
+
41
+ #pragma mark -
42
+ #pragma mark Structs and Constants
43
+
44
+ #pragma mark YMKMapCoordinate
45
+
46
+ /**
47
+ Creates a point on the map with coordinate (0.0; 0.0).
48
+ */
49
+ #define YMKMapCoordinateZero ((YMKMapCoordinate){0.0f, 0.0f})
50
+
51
+ /**
52
+ Returns a point on the map with invalid coordinate
53
+ */
54
+ #define YMKMapCoordinateInvalid ((YMKMapCoordinate){kYMKMapStructsCoordinateLatitudeMaxValue + kYMKMapStructsComparisonAccuracy * 10.f, kYMKMapStructsCoordinateLongitudeMaxValue + kYMKMapStructsComparisonAccuracy * 10.f})
55
+
56
+ #pragma mark YMKMapCoordinateComponents
57
+
58
+ /**
59
+ Represents a geographical coordinate (latitude or longitude) in the degrees-minutes-seconds (DMS) format.
60
+ */
61
+ typedef struct {
62
+ short degrees;
63
+ unsigned short minutes;
64
+ float seconds;
65
+ } YMKCoordinateComponents;
66
+
67
+ #pragma mark YMKMapRegionSize
68
+
69
+ /**
70
+ Defines the size of YMKMapRegion instance
71
+ */
72
+ typedef struct {
73
+ YMKMapDegrees latitudeDelta; /**< the vertical distance of the region */
74
+ YMKMapDegrees longitudeDelta; /**< the horizontal distance of the region */
75
+ } YMKMapRegionSize;
76
+
77
+ /**
78
+ Returns the map region which has a zero size.
79
+ */
80
+ #define YMKMapRegionSizeZero ((YMKMapRegionSize){0.0f, 0.0f})
81
+
82
+ /**
83
+ Returns region size with invalid parameters
84
+ */
85
+ #define YMKMapRegionSizeInvalid ((YMKMapRegionSize){kYMKMapRegionSizeDeltaLatitudeMaxValue + kYMKMapStructsComparisonAccuracy * 10.f, kYMKMapRegionSizeDeltaLongitudeMaxValue + kYMKMapStructsComparisonAccuracy * 10.f})
86
+
87
+ /**
88
+ Returns map region size containing the entire Earth.
89
+ */
90
+ #define YMKMapRegionSizeEarth ((YMKMapRegionSize){kYMKMapRegionSizeDeltaLatitudeMaxValue, kYMKMapRegionSizeDeltaLongitudeMaxValue})
91
+
92
+ #pragma mark YMKMapRegion
93
+
94
+ /**
95
+ Defines a map region.
96
+ */
97
+ typedef struct {
98
+ YMKMapCoordinate center; /**< the coordinate of the region center */
99
+ YMKMapRegionSize span; /**< the region size */
100
+ } YMKMapRegion;
101
+
102
+ /**
103
+ Returns the zero-sized region.
104
+ */
105
+ #define YMKMapRegionZero ((YMKMapRegion){YMKMapCoordinateZero, YMKMapRegionSizeZero})
106
+
107
+ /**
108
+ Returns invalid map region.
109
+ */
110
+ #define YMKMapRegionInvalid ((YMKMapRegion){YMKMapCoordinateInvalid, YMKMapRegionSizeInvalid})
111
+
112
+ /**
113
+ Returns map region containing the entire Earth.
114
+ */
115
+ #define YMKMapRegionEarth ((YMKMapRegion){YMKMapCoordinateZero, YMKMapRegionSizeEarth})
116
+
117
+ #pragma mark YMKMapRect
118
+
119
+ /**
120
+ Defines a rectangular area on the map.
121
+ */
122
+ typedef struct {
123
+ YMKMapCoordinate topLeft; /**< the coordinate of the top left corner of the rectangle */
124
+ YMKMapCoordinate bottomRight; /**< the coordinate of the bottom right corner of the rectangle */
125
+ } YMKMapRect;
126
+
127
+ /**
128
+ Return the zero-sized rectangular area.
129
+ */
130
+ #define YMKMapRectZero ((YMKMapRect){YMKMapCoordinateZero, YMKMapCoordinateZero})
131
+
132
+ /**
133
+ Returns rectangular area with invalid parameters
134
+ */
135
+ #define YMKMapRectInvalid ((YMKMapRect){YMKMapCoordinateInvalid, YMKMapCoordinateInvalid})
136
+
137
+
138
+ #pragma mark YMKMapViewPort
139
+
140
+ /**
141
+ Defines map view port
142
+ */
143
+ typedef struct {
144
+ YMKMapRect mapRect; /**< current map rectangular area covered by view port */
145
+ NSUInteger zoomLevel; /**< current map zoom level */
146
+ } YMKMapViewPort;
147
+
148
+ /**
149
+ Returns zero-sized viewport
150
+ */
151
+ #define YMKMapViewPortZero ((YMKMapViewPort){YMKMapRectZero, 0})
152
+
153
+ /**
154
+ Defines a point on the map.
155
+ */
156
+ typedef struct {
157
+ long long int x;
158
+ long long int y;
159
+ } YMKMapPoint;
160
+
161
+ #pragma mark -
162
+ #pragma mark Utility Functions
163
+
164
+ #pragma mark YMKMapDegrees
165
+
166
+ /**
167
+ Converts degrees to the string representation.
168
+ @param degrees the coordinate in degrees
169
+ @return the string representation of the coordinate in degrees
170
+ */
171
+ NSString * NSStringFromMapDegrees(YMKMapDegrees degrees);
172
+
173
+ #pragma mark YMKMapCoordinate
174
+
175
+ /**
176
+ Creates a geographical point with specified coordinates.
177
+ @param latitude the latitude of the point
178
+ @param longitude the longitude of the point
179
+ @return the geographical point with the specified coordinates
180
+ */
181
+ extern YMKMapCoordinate YMKMapCoordinateMake(YMKMapDegrees latitude, YMKMapDegrees longitude);
182
+
183
+ /**
184
+ Compares two geographical coordinates for equality.
185
+ @param ll1 the first coordinate
186
+ @param ll2 the second coordinate
187
+ @return YES if coordinates are equal, NO - otherwise
188
+ */
189
+ extern BOOL YMKMapCoordinateEqualToMapCoordinate(YMKMapCoordinate ll1, YMKMapCoordinate ll2);
190
+
191
+ /**
192
+ Checks if the specified map coordinate is a zero coordinate (YMKMapCoordinateZero).
193
+ @param ll a map coordinate
194
+ @return YES if the map coordinate is a zero coordinate, NO - otherwise
195
+ @include
196
+ */
197
+ extern BOOL YMKMapCoordinateIsZero(YMKMapCoordinate ll);
198
+
199
+ /**
200
+ Checks if the specified map coordinate is invalid (YMKMapCoordinateInvalid).
201
+ @param ll a map coordinate
202
+ @return YES if the map coordinate is invalid, NO - otherwise
203
+ */
204
+ extern BOOL YMKMapCoordinateIsValid(YMKMapCoordinate ll);
205
+
206
+ /**
207
+ Creates a map coordinate from the dictionary.
208
+ The dictionary should contain two keys: latitude and longitude which values should be of type double.
209
+ @param dict the dictionary
210
+ @return the created coordinate
211
+ */
212
+ extern YMKMapCoordinate YMKMapCoordinateFromDictionary(NSDictionary * dict);
213
+
214
+ /**
215
+ Converts a map coordinate to the dictionary.
216
+ @param ll a map coordinate
217
+ @return the dictionary
218
+ */
219
+ extern NSDictionary * NSDictionaryFromMapCoordinate(YMKMapCoordinate ll);
220
+
221
+ /**
222
+ Returns the string representation of a map coordinate.
223
+ @param ll a map coordinate
224
+ @param pretty YES - to use pretty formatting (degrees/minutes/seconds), NO - not
225
+ @return the string representation of the specified coordinate
226
+ */
227
+ extern NSString * NSStringFromMapCoordinate(YMKMapCoordinate ll, BOOL pretty);
228
+
229
+ #pragma mark YMKMapCoordinateComponents
230
+
231
+ /**
232
+ Splits a geographical coordinate into components (degrees, minutes and seconds).
233
+ @param degrees a geographical coordinate
234
+ @return components of the specified geograhical coordinate (degrees, minutes and seconds)
235
+ */
236
+ extern YMKCoordinateComponents YMKCoordinateComponentsFromMapDegrees(YMKMapDegrees degrees);
237
+
238
+ /**
239
+ Returns the string representation of coordinate componets (degrees, minutes and seconds).
240
+ @param components coordinate components (degrees, minutes and seconds)
241
+ @return the string representation of the specified coordinate componets
242
+ */
243
+ extern NSString * NSStringFromCoordinateComponents(YMKCoordinateComponents components);
244
+
245
+ #pragma mark YMKMapRegionSize
246
+
247
+ /**
248
+ Creates a region of the specified size.
249
+ @param latitudeDelta the difference between latitudes of the most northern and and the most southern points of the region, in degrees.
250
+ @param longitudeDelta the difference between longitudes of the most western and and the most eastern points of the region, in degrees.
251
+ @return the region of the specified size
252
+ */
253
+ extern YMKMapRegionSize YMKMapRegionSizeMake(YMKMapDegrees latitudeDelta, YMKMapDegrees longitudeDelta);
254
+
255
+ /**
256
+ Checks if two regions have equal size.
257
+ @param s1 the size of the first region
258
+ @param s2 the size of the second region
259
+ @return YES - regions have equal size, NO - not
260
+ */
261
+ extern BOOL YMKMapRegionSizeEqualToMapRegionSize(YMKMapRegionSize s1, YMKMapRegionSize s2);
262
+
263
+ /**
264
+ Checks if a map region has a zero size.
265
+ @param size the region size
266
+ @return YES - the map region has a zero size, NO - not
267
+ */
268
+ extern BOOL YMKMapRegionSizeIsZero(YMKMapRegionSize size);
269
+
270
+ /**
271
+ Checks if a map region size is valid.
272
+ @param size the region size
273
+ @return YES - the region size is valid, NO - not
274
+ */
275
+ extern BOOL YMKMapRegionSizeIsValid(YMKMapRegionSize size);
276
+
277
+ /**
278
+ Retrieves the region size from the dictionary.
279
+ The dictionary should contain two keys: latitudeDelta and longitudeDelta which values should be of type double.
280
+ @param dict the dictionary
281
+ @return the region size from the dictionary
282
+ */
283
+ extern YMKMapRegionSize YMKMapRegionSizeFromDictionary(NSDictionary * dict);
284
+
285
+ /**
286
+ Converts the map region size to the dictionary.
287
+ @param size the map region size
288
+ @return the dictionary
289
+ */
290
+ extern NSDictionary * NSDictionaryFromMapRegionSize(YMKMapRegionSize size);
291
+
292
+ #pragma mark YMKMapRegion
293
+
294
+ /**
295
+ Creates a map region with the specified center and the span measured from its center by latitude and longitude.
296
+ @param center map coordinates of the region center
297
+ @param span the span measured from the region center by latitude and longitude
298
+ @return the specified region
299
+ */
300
+ extern YMKMapRegion YMKMapRegionMake(YMKMapCoordinate center, YMKMapRegionSize span);
301
+
302
+ /**
303
+ Checks if two regions are equal.
304
+ @param r1 the first region
305
+ @param r2 the second region
306
+ @returns YES - regions are equal, NO - not
307
+ */
308
+ extern BOOL YMKMapRegionEqualToMapRegion(YMKMapRegion r1, YMKMapRegion r2);
309
+
310
+ /**
311
+ Checks if the specified region is zero-sized.
312
+ @param region the map region
313
+ @return YES - the specified region is zero-sized, NO - not
314
+ */
315
+ extern BOOL YMKMapRegionIsZero(YMKMapRegion region);
316
+
317
+ /**
318
+ Checks if the specified region is valid.
319
+ @param region the region
320
+ @returns YES - the specified region is valid, NO - not
321
+ */
322
+ extern BOOL YMKMapRegionIsValid(YMKMapRegion region);
323
+
324
+ /**
325
+ Checks if the map region contains the specified geographical coordinate.
326
+ @param region the map region
327
+ @param ll the geographical coordinate
328
+ @return YES - the region contains the coordinate, NO - not
329
+ */
330
+ extern BOOL YMKMapRegionContainsMapCoordinate(YMKMapRegion region, YMKMapCoordinate ll);
331
+
332
+ /**
333
+ Checks if the first map region contains the second map region.
334
+ @param r1 the first map region
335
+ @param r2 the second map region
336
+ @return YES - the first region contains the second region, NO - not
337
+ */
338
+ extern BOOL YMKMapRegionContainsMapRegion(YMKMapRegion r1, YMKMapRegion r2);
339
+
340
+ /**
341
+ Returns the map coordinate of the top left corner of the specified region.
342
+ @param region the region
343
+ @return the map coordinate of the top left corner of the specified region
344
+ */
345
+ extern YMKMapCoordinate YMKMapRegionGetTopLeftCoordinate(YMKMapRegion region);
346
+
347
+ /**
348
+ Returns the map coordinate of the bottom right corner of the specified region.
349
+ @param region specifies the region
350
+ @return the map coordinate of the bottom right corner of the specified region
351
+ */
352
+ extern YMKMapCoordinate YMKMapRegionGetBottomRightCoordinate(YMKMapRegion region);
353
+
354
+ /**
355
+ Retrieves the map region from the dictionary.
356
+ @param dict the dictionary
357
+ @return the map region from the dictionary
358
+ */
359
+ extern YMKMapRegion YMKMapRegionFromDictionary(NSDictionary * dict);
360
+
361
+ /**
362
+ Converts the map region to the dictionary.
363
+ @param region the map region
364
+ @return the dictionary
365
+ */
366
+ extern NSDictionary * NSDictionaryFromMapRegion(YMKMapRegion region);
367
+
368
+ /**
369
+ Returns a rectangular area which fits the specified region.
370
+ @param region specifies the region
371
+ @return a rectangular area which fits the specified region
372
+ */
373
+ extern YMKMapRect YMKMapRectFromMapRegion(YMKMapRegion region);
374
+
375
+ #pragma mark YMKMapRect
376
+
377
+ /**
378
+ Creates a rectangular area from the top left point and the bottom right point.
379
+ @param topLeft the top left point
380
+ @param bottomRight the bottom right point
381
+ @return the created rectangular area
382
+ */
383
+ extern YMKMapRect YMKMapRectMake(YMKMapCoordinate topLeft, YMKMapCoordinate bottomRight);
384
+
385
+ /**
386
+ Checks if two rectangular areas are equal.
387
+ @param r1 the first rectangular area
388
+ @param r2 the second rectangular area
389
+ @return YES - the rectangular areas are equal, NO - not
390
+ */
391
+ extern BOOL YMKMapRectEqualToMapRect(YMKMapRect r1, YMKMapRect r2);
392
+
393
+ /**
394
+ Checks if the specified rectangular area has zero size.
395
+ @param rect the rectangular area
396
+ @return YES - the specified rectangular area has zero size, NO - not
397
+ */
398
+ extern BOOL YMKMapRectIsZero(YMKMapRect rect);
399
+
400
+ /**
401
+ Checks if the specified rectangular area is valid.
402
+ @param rect the rectangular area
403
+ @return YES - the specified rectangular area is valid, NO - not
404
+ */
405
+ extern BOOL YMKMapRectIsValid(YMKMapRect rect);
406
+
407
+ /**
408
+ Checks if the rectangular area contains the specified map coordinate.
409
+ @param rect the rectangular area
410
+ @param ll the geographical coordinate
411
+ @return YES - the rectangular area contains the specified coordinate, NO - not
412
+ */
413
+ extern BOOL YMKMapRectContainsMapCoordinate(YMKMapRect rect, YMKMapCoordinate ll);
414
+
415
+ /**
416
+ Checks if the first rectangular area contains the second rectangular area.
417
+ @param r1 the first rectangular area
418
+ @param r2 the second rectangular area
419
+ @return YES - the the first rectangular area contains the second rectangular area, NO - not
420
+ */
421
+ extern BOOL YMKMapRectContainsMapRect(YMKMapRect r1, YMKMapRect r2);
422
+
423
+ /**
424
+ Checks if the first rectangular area intersects the second rectangular area.
425
+ @param r1 the first rectangular area
426
+ @param r2 the second rectangular area
427
+ @return YES - the the first rectangular area intersects the second rectangular area, NO - not
428
+ */
429
+ extern BOOL YMKMapRectIntersectsMapRect(YMKMapRect r1, YMKMapRect r2);
430
+
431
+ /**
432
+ Retrieves the specified rectangular area from the dictionary.
433
+ @param dict the dictionary
434
+ @return the rectangular area from the dictionary
435
+ */
436
+ extern YMKMapRect YMKMapRectFromDictionary(NSDictionary * dict);
437
+
438
+ /**
439
+ Converts the specified rectangular area to the dictionary
440
+ @param rect the rectangular area
441
+ @return the dictionary
442
+ */
443
+ extern NSDictionary * NSDictionaryFromMapRect(YMKMapRect rect);
444
+
445
+ /**
446
+ Returns the string representation of the rectangular area.
447
+ @param rect the rectangular area
448
+ @return the string representation of the rectangular area
449
+ */
450
+ extern NSString * NSStringFromMapRect(YMKMapRect rect);
451
+
452
+ /**
453
+ Creates a map region from the specified rectangular area.
454
+ @param rect the rectangular area
455
+ @return the map region created from the specified rectangular area
456
+ */
457
+ extern YMKMapRegion YMKMapRegionFromMapRect(YMKMapRect rect);
458
+
459
+ /**
460
+ Creates a rectangular area with the specified center and the specified vertical and horizontal span measured from its center.
461
+ @param center the center of the rectangular area
462
+ @param meters the vertical and horizontal span measured from the center (in meters)
463
+ @return the rectangular area
464
+ */
465
+ extern YMKMapRect YMKMapRectMakeWithCenterAndMeters(CLLocationCoordinate2D center, long long int meters);
466
+ extern YMKMapCoordinate YMKMapRectGetCenterCoordinate(YMKMapRect rect);
467
+
468
+ extern YMKMapRect YMKMapRectNormalize(const YMKMapRect rect);
469
+
470
+ #pragma mark YMKMapViewPort
471
+
472
+ /**
473
+ Creates view port with given rect and zoom level
474
+ @param rect the rectangular area
475
+ @param zoomLevel map zoom level
476
+ @return map view port
477
+ */
478
+ extern YMKMapViewPort YMKMapViewPortMake(YMKMapRect rect, NSUInteger zoomLevel);
479
+
480
+ /**
481
+ Checks if the first map view port contains the second view port.
482
+ @param viewPort the first map view port
483
+ @param subViewPort the second map view port
484
+ @return YES - the the first view port contains the second view port, NO - not
485
+ */
486
+ extern BOOL YMKMapViewPortContainsViewPort(YMKMapViewPort viewPort, YMKMapViewPort subViewPort);
487
+ extern BOOL YMKMapViewPortEqualToViewPort(YMKMapViewPort a, YMKMapViewPort b);
488
+ extern BOOL YMKMapViewPortIsZero(YMKMapViewPort rect);
489
+ extern NSString * NSStringFromMapViewPort(YMKMapViewPort viewPort);
490
+
491
+ /**
492
+ Retrieves the specified view port from the dictionary.
493
+ @param dict the dictionary
494
+ @return the view port from the dictionary
495
+ */
496
+ extern YMKMapViewPort YMKMapViewPortFromDictionary(NSDictionary * dict);
497
+
498
+ /**
499
+ Converts the specified view port to the dictionary
500
+ @param viewPort the view port
501
+ @return the dictionary
502
+ */
503
+ extern NSDictionary * NSDictionaryFromMapViewPort(YMKMapViewPort viewPort);
504
+
505
+ #ifdef __cplusplus
506
+ }
507
+ #endif