motion-yandexmapkit 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +18 -0
- data/Gemfile +4 -0
- data/LICENSE +26 -0
- data/README.md +36 -0
- data/Rakefile +2 -0
- data/YandexMapKit/Headers/YMKAnnotation.h +34 -0
- data/YandexMapKit/Headers/YMKAnnotationView.h +150 -0
- data/YandexMapKit/Headers/YMKCalloutContentView-Protocol.h +30 -0
- data/YandexMapKit/Headers/YMKCalloutView.h +61 -0
- data/YandexMapKit/Headers/YMKDraggableAnnotation.h +25 -0
- data/YandexMapKit/Headers/YMKDraggablePinAnnotationView.h +47 -0
- data/YandexMapKit/Headers/YMKDraggablePinAnnotationViewDelegate+Protocol.h +41 -0
- data/YandexMapKit/Headers/YMKGeoObject.h +26 -0
- data/YandexMapKit/Headers/YMKHostsConfiguration.h +30 -0
- data/YandexMapKit/Headers/YMKMapLayerInfo.h +57 -0
- data/YandexMapKit/Headers/YMKMapLayersConfiguration.h +50 -0
- data/YandexMapKit/Headers/YMKMapStructs.h +507 -0
- data/YandexMapKit/Headers/YMKMapView.h +278 -0
- data/YandexMapKit/Headers/YMKMapViewConfiguration.h +31 -0
- data/YandexMapKit/Headers/YMKMapViewDelegate+Protocol.h +134 -0
- data/YandexMapKit/Headers/YMKPinAnnotationView.h +47 -0
- data/YandexMapKit/Headers/YMKRuler.h +30 -0
- data/YandexMapKit/Headers/YMKTrafficInformer.h +58 -0
- data/YandexMapKit/Headers/YMKUserLocation.h +51 -0
- data/YandexMapKit/Headers/YandexMapKit.h +19 -0
- data/YandexMapKit/YandexMapKit.bundle/en.lproj/Localizable.strings +146 -0
- data/YandexMapKit/YandexMapKit.bundle/en.lproj/TileUnavailable.png +0 -0
- data/YandexMapKit/YandexMapKit.bundle/en.lproj/TileUnavailable@2x.png +0 -0
- data/YandexMapKit/YandexMapKit.bundle/en.lproj/TileUnavailable~ipad.png +0 -0
- data/YandexMapKit/YandexMapKit.bundle/en.lproj/YMKBlueBalloon.png +0 -0
- data/YandexMapKit/YandexMapKit.bundle/en.lproj/YMKBlueBalloon@2x.png +0 -0
- data/YandexMapKit/YandexMapKit.bundle/en.lproj/YMKBlueBalloonCommercial.png +0 -0
- data/YandexMapKit/YandexMapKit.bundle/en.lproj/YMKBlueBalloonCommercial@2x.png +0 -0
- data/YandexMapKit/YandexMapKit.bundle/en.lproj/YMKCalloutBaloon.png +0 -0
- data/YandexMapKit/YandexMapKit.bundle/en.lproj/YMKCalloutBaloon@2x.png +0 -0
- data/YandexMapKit/YandexMapKit.bundle/en.lproj/YMKCalloutStem.png +0 -0
- data/YandexMapKit/YandexMapKit.bundle/en.lproj/YMKCalloutStem@2x.png +0 -0
- data/YandexMapKit/YandexMapKit.bundle/en.lproj/YMKCurrentRouteStepNode.png +0 -0
- data/YandexMapKit/YandexMapKit.bundle/en.lproj/YMKCurrentRouteStepNode@2x.png +0 -0
- data/YandexMapKit/YandexMapKit.bundle/en.lproj/YMKDraggableBlueBalloon.png +0 -0
- data/YandexMapKit/YandexMapKit.bundle/en.lproj/YMKGreenBalloon.png +0 -0
- data/YandexMapKit/YandexMapKit.bundle/en.lproj/YMKGreenBalloon@2x.png +0 -0
- data/YandexMapKit/YandexMapKit.bundle/en.lproj/YMKRouteMarkerBus.png +0 -0
- data/YandexMapKit/YandexMapKit.bundle/en.lproj/YMKRouteMarkerBus@2x.png +0 -0
- data/YandexMapKit/YandexMapKit.bundle/en.lproj/YMKRouteMarkerMetro.png +0 -0
- data/YandexMapKit/YandexMapKit.bundle/en.lproj/YMKRouteMarkerMetro@2x.png +0 -0
- data/YandexMapKit/YandexMapKit.bundle/en.lproj/YMKRouteNode.png +0 -0
- data/YandexMapKit/YandexMapKit.bundle/en.lproj/YMKRouteNode@2x.png +0 -0
- data/YandexMapKit/YandexMapKit.bundle/en.lproj/YMUserLocationMarkerView.png +0 -0
- data/YandexMapKit/YandexMapKit.bundle/en.lproj/YMUserLocationMarkerView@2x.png +0 -0
- data/YandexMapKit/YandexMapKit.bundle/en.lproj/YMUserLocationMarkerViewDirection.png +0 -0
- data/YandexMapKit/YandexMapKit.bundle/en.lproj/YMUserLocationMarkerViewDirection@2x.png +0 -0
- data/YandexMapKit/YandexMapKit.bundle/ru.lproj/Localizable.strings +143 -0
- data/YandexMapKit/YandexMapKit.bundle/ru.lproj/TileUnavailable.png +0 -0
- data/YandexMapKit/YandexMapKit.bundle/ru.lproj/TileUnavailable@2x.png +0 -0
- data/YandexMapKit/YandexMapKit.bundle/ru.lproj/TileUnavailable~ipad.png +0 -0
- data/YandexMapKit/YandexMapKit.bundle/ru.lproj/YMUserLocationMarkerView.png +0 -0
- data/YandexMapKit/YandexMapKit.bundle/ru.lproj/YMUserLocationMarkerView@2x.png +0 -0
- data/YandexMapKit/YandexMapKit.bundle/ru.lproj/YMUserLocationMarkerViewDirection.png +0 -0
- data/YandexMapKit/YandexMapKit.bundle/ru.lproj/YMUserLocationMarkerViewDirection@2x.png +0 -0
- data/YandexMapKit/YandexMapKit.bundle/tr.lproj/Localizable.strings +141 -0
- data/YandexMapKit/YandexMapKit.bundle/tr.lproj/TileUnavailable.png +0 -0
- data/YandexMapKit/YandexMapKit.bundle/tr.lproj/TileUnavailable@2x.png +0 -0
- data/YandexMapKit/YandexMapKit.bundle/tr.lproj/TileUnavailable~ipad.png +0 -0
- data/YandexMapKit/YandexMapKit.bundle/tr.lproj/YMUserLocationMarkerView.png +0 -0
- data/YandexMapKit/YandexMapKit.bundle/tr.lproj/YMUserLocationMarkerView@2x.png +0 -0
- data/YandexMapKit/YandexMapKit.bundle/tr.lproj/YMUserLocationMarkerViewDirection.png +0 -0
- data/YandexMapKit/YandexMapKit.bundle/tr.lproj/YMUserLocationMarkerViewDirection@2x.png +0 -0
- data/YandexMapKit/YandexMapKit.bundle/uk.lproj/Localizable.strings +141 -0
- data/YandexMapKit/YandexMapKit.bundle/uk.lproj/TileUnavailable.png +0 -0
- data/YandexMapKit/YandexMapKit.bundle/uk.lproj/TileUnavailable@2x.png +0 -0
- data/YandexMapKit/YandexMapKit.bundle/uk.lproj/TileUnavailable~ipad.png +0 -0
- data/YandexMapKit/YandexMapKit.bundle/uk.lproj/YMUserLocationMarkerView.png +0 -0
- data/YandexMapKit/YandexMapKit.bundle/uk.lproj/YMUserLocationMarkerView@2x.png +0 -0
- data/YandexMapKit/YandexMapKit.bundle/uk.lproj/YMUserLocationMarkerViewDirection.png +0 -0
- data/YandexMapKit/YandexMapKit.bundle/uk.lproj/YMUserLocationMarkerViewDirection@2x.png +0 -0
- data/YandexMapKit/libYandexMapKit.a +0 -0
- data/lib/motion-yandexmapkit.rb +23 -0
- data/lib/motion-yandexmapkit/version.rb +5 -0
- data/motion-yandexmapkit.gemspec +17 -0
- metadata +126 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
Copyright (c) 2012 Vladimir Pouzanov
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
23
|
+
|
24
|
+
|
25
|
+
The license for files contained in YandexMapKit is available at
|
26
|
+
http://legal.yandex.ru/mapkit/
|
data/README.md
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
# Motion::YandexMapKit
|
2
|
+
|
3
|
+
This gem provides YandexMapKit support for RubyMotion. YandexMapKit is MapKit-like framework based on Yandex.com own maps and navigation data.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
### Update your Rakefile
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
require 'motion-yandexmapkit'
|
11
|
+
```
|
12
|
+
|
13
|
+
### Install the map support files into your resources
|
14
|
+
|
15
|
+
```bash
|
16
|
+
$ rake yandexmapkit:install
|
17
|
+
```
|
18
|
+
|
19
|
+
### Get the API key
|
20
|
+
|
21
|
+
You can obtain the API key by mailing [support@mobmaps.yandex.ru](mailto:support@mobmaps.yandex.ru) with subject "Yandex.Mobmaps" and a description of your plans on using the framework.
|
22
|
+
|
23
|
+
## Sample Project
|
24
|
+
|
25
|
+
Please check the [official demo](https://github.com/yandexmobile/yandexmapkit-ios/) for now.
|
26
|
+
|
27
|
+
### Small demo
|
28
|
+
|
29
|
+
```ruby
|
30
|
+
class MapController < UIViewController
|
31
|
+
def loadView
|
32
|
+
self.view = YMKMapView.alloc.init
|
33
|
+
self.view.apiKey = '...'
|
34
|
+
end
|
35
|
+
end
|
36
|
+
```
|
data/Rakefile
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
/*
|
2
|
+
* YMKAnnotation.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 "YMKGeoObject.h"
|
15
|
+
|
16
|
+
/**
|
17
|
+
Provides information about annotation objects to a map view, including their location and titles.
|
18
|
+
@see http://developer.apple.com/library/ios/#documentation/MapKit/Reference/MKAnnotationView_Class/Reference/Reference.html
|
19
|
+
*/
|
20
|
+
@protocol YMKAnnotation <YMKGeoObject>
|
21
|
+
|
22
|
+
@optional
|
23
|
+
|
24
|
+
/**
|
25
|
+
The title text of the annotation.
|
26
|
+
*/
|
27
|
+
- (NSString *)title;
|
28
|
+
|
29
|
+
/**
|
30
|
+
The subtitle text of the annotation.
|
31
|
+
*/
|
32
|
+
- (NSString *)subtitle;
|
33
|
+
|
34
|
+
@end
|
@@ -0,0 +1,150 @@
|
|
1
|
+
/*
|
2
|
+
* YMKAnnotationView.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 "YMKAnnotation.h"
|
14
|
+
|
15
|
+
/**
|
16
|
+
Visually presents annotations on the map.
|
17
|
+
@see http://developer.apple.com/library/ios/#documentation/MapKit/Reference/MKAnnotationView_Class/Reference/Reference.html
|
18
|
+
*/
|
19
|
+
|
20
|
+
@protocol YMKCalloutContentView;
|
21
|
+
@class YMKCalloutView;
|
22
|
+
|
23
|
+
@interface YMKAnnotationView : UIView {
|
24
|
+
@private
|
25
|
+
id _internal;
|
26
|
+
NSString * _reuseIdentifier;
|
27
|
+
NSObject <YMKAnnotation> * _annotation;
|
28
|
+
BOOL _selected;
|
29
|
+
CGPoint _centerOffset;
|
30
|
+
UIImage * _image;
|
31
|
+
UIImageView * _imageView;
|
32
|
+
BOOL _keepsTouches;
|
33
|
+
BOOL _alignCenter;
|
34
|
+
NSInteger _zIndex;
|
35
|
+
BOOL _canShowCallout;
|
36
|
+
UIView * _rightCalloutAccessoryView;
|
37
|
+
UIView * _leftCalloutAccessoryView;
|
38
|
+
CGPoint _calloutOffset;
|
39
|
+
UIView<YMKCalloutContentView> * _calloutContentView;
|
40
|
+
|
41
|
+
YMKCalloutView *_calloutView;
|
42
|
+
@protected
|
43
|
+
BOOL _calloutVisible;
|
44
|
+
}
|
45
|
+
|
46
|
+
/**
|
47
|
+
The string identifier which allows to reuse the annotation view.
|
48
|
+
*/
|
49
|
+
@property (nonatomic, readonly) NSString * reuseIdentifier;
|
50
|
+
|
51
|
+
/**
|
52
|
+
The annotation object associated with the annotation view.
|
53
|
+
*/
|
54
|
+
@property (nonatomic, retain) NSObject<YMKAnnotation> * annotation;
|
55
|
+
|
56
|
+
/**
|
57
|
+
The offset (in points) relative to the coordinate point of the annotation.
|
58
|
+
*/
|
59
|
+
@property (nonatomic) CGPoint centerOffset;
|
60
|
+
|
61
|
+
/**
|
62
|
+
Specifies if the annotation view is currently selected.
|
63
|
+
*/
|
64
|
+
@property (nonatomic, getter=isSelected) BOOL selected;
|
65
|
+
|
66
|
+
/**
|
67
|
+
The image displayed in the annotation view.
|
68
|
+
*/
|
69
|
+
@property (nonatomic, retain) UIImage * image;
|
70
|
+
|
71
|
+
/**
|
72
|
+
Specifies if the content of the annotation view should be centrally aligned.
|
73
|
+
*/
|
74
|
+
@property (nonatomic, assign) BOOL alignCenter;
|
75
|
+
|
76
|
+
/**
|
77
|
+
zIndex of the annotation view. The object with the highest zIndex is displayed
|
78
|
+
uppermost on the map.
|
79
|
+
*/
|
80
|
+
@property (nonatomic, assign) NSInteger zIndex;
|
81
|
+
|
82
|
+
/**
|
83
|
+
Specifies if the annotation view is able to display a callout balloon.
|
84
|
+
*/
|
85
|
+
@property (nonatomic, assign) BOOL canShowCallout;
|
86
|
+
|
87
|
+
/**
|
88
|
+
The view which is displayed from the right side of the callout balloon.
|
89
|
+
*/
|
90
|
+
@property (nonatomic, retain) UIView * rightCalloutAccessoryView;
|
91
|
+
|
92
|
+
/**
|
93
|
+
The view which is displayed from the left side of the callout balloon.
|
94
|
+
*/
|
95
|
+
@property (nonatomic, retain) UIView * leftCalloutAccessoryView;
|
96
|
+
|
97
|
+
/**
|
98
|
+
The offset of the callout (in points) relative to the center point of the annotation view.
|
99
|
+
*/
|
100
|
+
@property (nonatomic, assign) CGPoint calloutOffset;
|
101
|
+
|
102
|
+
/**
|
103
|
+
The original size of the frame annotation view (in pixels).
|
104
|
+
*/
|
105
|
+
@property (nonatomic, readonly) UIEdgeInsets minimumMargins;
|
106
|
+
|
107
|
+
/**
|
108
|
+
The container view for the callout. If nil is specified the callout will look like a
|
109
|
+
regular title/subtitle callout view.
|
110
|
+
You should specify this property if you want to use a custom UIView in the annotation callout.
|
111
|
+
Default value is nil.
|
112
|
+
*/
|
113
|
+
@property (nonatomic, retain) UIView<YMKCalloutContentView> * calloutContentView;
|
114
|
+
|
115
|
+
/**
|
116
|
+
Designated initializer. Initializes a new annotation view.
|
117
|
+
@param annotation the annotation object associated with the view
|
118
|
+
@param reuseIdentifier the identifier you need to reuse the view
|
119
|
+
@return a new annotation view
|
120
|
+
*/
|
121
|
+
- (id)initWithAnnotation:(NSObject<YMKAnnotation> *)annotation
|
122
|
+
reuseIdentifier:(NSString *)reuseIdentifier;
|
123
|
+
|
124
|
+
/**
|
125
|
+
Called when the annotation view is removed from the reuse queue.
|
126
|
+
*/
|
127
|
+
- (void)prepareForReuse;
|
128
|
+
|
129
|
+
/**
|
130
|
+
Specifies if the view should be displayed selected.
|
131
|
+
@param selected YES - the view is displayed selected, NO - not
|
132
|
+
@param animated YES - selecting/deselecting the view should be animated, NO - not
|
133
|
+
*/
|
134
|
+
- (void)setSelected:(BOOL)selected animated:(BOOL)animated;
|
135
|
+
|
136
|
+
/**
|
137
|
+
Sets the accessory view displayed on the left side of the callout.
|
138
|
+
@param view the accessory view object
|
139
|
+
@param animated YES - selecting/deselecting the accessory view should be animated, NO - not
|
140
|
+
*/
|
141
|
+
- (void)setLeftCalloutAccessoryView:(UIView *)view animated:(BOOL)animated;
|
142
|
+
|
143
|
+
/**
|
144
|
+
Specifies the accessory view displayed on the right side of the callout.
|
145
|
+
@param view the accessory view object
|
146
|
+
@param animated YES - selecting/deselecting the accessory view should be animated, NO - not
|
147
|
+
*/
|
148
|
+
- (void)setRightCalloutAccessoryView:(UIView *)view animated:(BOOL)animated;
|
149
|
+
|
150
|
+
@end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
/*
|
2
|
+
* YMKCalloutContentView.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
|
+
/**
|
15
|
+
The protocol is used to build custom callout view. To use this protocol, you
|
16
|
+
adopt it in any UIView subclass that intendent to use as custom callout view.
|
17
|
+
*/
|
18
|
+
|
19
|
+
@protocol YMKCalloutContentView <NSObject>
|
20
|
+
|
21
|
+
@optional
|
22
|
+
|
23
|
+
/**
|
24
|
+
A Boolean value indicating whether the view is highlighted. You should not call this method manually.
|
25
|
+
The map view invokes it in response to touch events entering or exiting the view’s bounds. Use
|
26
|
+
this to provide visual feedback for the user.
|
27
|
+
*/
|
28
|
+
- (void)setHighlighted:(BOOL)highlighted;
|
29
|
+
|
30
|
+
@end
|
@@ -0,0 +1,61 @@
|
|
1
|
+
/*
|
2
|
+
* YMKCalloutView.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 <UIKit/UIKit.h>
|
13
|
+
#import "YMKCalloutContentView-Protocol.h"
|
14
|
+
|
15
|
+
@class YMKCalloutView;
|
16
|
+
|
17
|
+
|
18
|
+
@protocol YMKCalloutViewDelegate
|
19
|
+
@optional
|
20
|
+
|
21
|
+
- (void)calloutViewGotSingleTap:(YMKCalloutView*)view;
|
22
|
+
- (void)calloutViewGotTapAtLeftAccessoryView:(YMKCalloutView*)view;
|
23
|
+
- (void)calloutViewGotTapAtRightAccessoryView:(YMKCalloutView*)view;
|
24
|
+
|
25
|
+
@end
|
26
|
+
|
27
|
+
|
28
|
+
@interface YMKCalloutView : UIView {
|
29
|
+
}
|
30
|
+
|
31
|
+
@property (nonatomic, assign) id delegate;
|
32
|
+
|
33
|
+
@property (nonatomic, retain) UIView *leftView;
|
34
|
+
@property (nonatomic, retain) UIView *rightView;
|
35
|
+
@property (nonatomic, retain) UIView<YMKCalloutContentView> * contentView;
|
36
|
+
|
37
|
+
@property (nonatomic, readonly) CGRect nonTransformedFrame;
|
38
|
+
@property (nonatomic, assign, readonly) BOOL highlighted;
|
39
|
+
|
40
|
+
@property (nonatomic, copy, readonly) NSString *reuseIdentifier;
|
41
|
+
|
42
|
+
- (id)initWithReuseIdentifier:(NSString *)aReuseIdentifier;
|
43
|
+
|
44
|
+
- (void)setAnchorPoint:(CGPoint)point boundaryRect:(CGRect)rect; // Point in points ({.5,.5} = center of superview). Rect in superview coordinates.
|
45
|
+
- (void)hide;
|
46
|
+
- (void)showInView:(UIView*)view;
|
47
|
+
|
48
|
+
- (void)setLeftView:(UIView *)newLeftView animated:(BOOL)animated;
|
49
|
+
- (void)setRightView:(UIView *)newRightView animated:(BOOL)animated;
|
50
|
+
|
51
|
+
- (void)animateAppearance;
|
52
|
+
|
53
|
+
+ (CGFloat)minimumSidePadding;
|
54
|
+
- (CGSize)sizeWithContentView:(UIView *)contentView
|
55
|
+
leftView:(UIView *)leftView
|
56
|
+
rightView:(UIView *)rightView
|
57
|
+
boundaryRect:(CGRect)rect;
|
58
|
+
|
59
|
+
- (void)prepareForReuse;
|
60
|
+
|
61
|
+
@end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
/*
|
2
|
+
* YMKDraggableAnnotation.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 <CoreLocation/CoreLocation.h>
|
14
|
+
|
15
|
+
/**
|
16
|
+
Provides information about draggable annotation objects to a map view.
|
17
|
+
*/
|
18
|
+
@protocol YMKDraggableAnnotation <YMKAnnotation>
|
19
|
+
|
20
|
+
/**
|
21
|
+
The map coordinates of the center point of a draggable annotation.
|
22
|
+
*/
|
23
|
+
@property (nonatomic, assign) CLLocationCoordinate2D coordinate;
|
24
|
+
|
25
|
+
@end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
/*
|
2
|
+
* YMKDraggablePinAnnotationView.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 "YMKPinAnnotationView.h"
|
15
|
+
#import "YMKDraggableAnnotation.h"
|
16
|
+
#import "YMKDraggablePinAnnotationViewDelegate+Protocol.h"
|
17
|
+
|
18
|
+
/**
|
19
|
+
The interface of the draggable pin annotation view.
|
20
|
+
*/
|
21
|
+
@interface YMKDraggablePinAnnotationView : YMKPinAnnotationView {
|
22
|
+
@private
|
23
|
+
BOOL _isMoving;
|
24
|
+
|
25
|
+
id _draggablePinInternal;
|
26
|
+
id<YMKDraggablePinAnnotationViewDelegate> _delegate;
|
27
|
+
}
|
28
|
+
|
29
|
+
/**
|
30
|
+
Indicates whether the draggable pin annotation is currently being moved.
|
31
|
+
*/
|
32
|
+
@property (nonatomic, readonly) BOOL isMoving;
|
33
|
+
|
34
|
+
/**
|
35
|
+
The delegate of the draggable pin annotation view.
|
36
|
+
*/
|
37
|
+
@property (nonatomic, assign) id<YMKDraggablePinAnnotationViewDelegate> delegate;
|
38
|
+
|
39
|
+
/**
|
40
|
+
Designated initializer. Initializes a new draggable pin annotation view.
|
41
|
+
@param annotation the annotation object associated with the view
|
42
|
+
@param reuseIdentifier the identifier you need to reuse the view
|
43
|
+
@return a new draggable annotation view
|
44
|
+
*/
|
45
|
+
- (id)initWithAnnotation:(id<YMKDraggableAnnotation>)annotation reuseIdentifier:(NSString *)reuseIdentifier;
|
46
|
+
|
47
|
+
@end
|