11#import < UIKit/UIKit.h>
22#import " NCExport.h"
33#import " NCAnimationType.h"
4+ #import " NCLocationWindow.h"
45
56NS_ASSUME_NONNULL_BEGIN
67
@@ -13,194 +14,31 @@ NS_ASSUME_NONNULL_BEGIN
1314@class NCPoint;
1415@class NCCamera;
1516
16- @protocol NCGestureRecognizerDelegate;
17- @protocol NCLocationViewListener;
1817@protocol NCPickListener;
1918
2019DEFAULT_EXPORT_ATTRIBUTE
2120@interface NCLocationView : UIView
2221
23- - (instancetype ) initWithFrame : (CGRect) frame ;
22+ - (id ) initWithCoder : ( NSCoder *) aDecoder ;
2423
25- - (void ) setSublocationId : ( int ) sublocationId ;
24+ - (id ) initWithFrame : (CGRect) frame ;
2625
27- - (void ) removeAllMapObjects ;
26+ // - (void)applyFilter:(NSString *)filer layer:(NSString *)layer ;
2827
29- - (NCCircleMapObject *) addCircleMapObject ;
3028
31- - ( bool ) removeCircleMapObject : (NCCircleMapObject *) circleMapObject ;
29+ // @property (weak, nonatomic, nullable) id<NCLocationViewListener> locationViewListener ;
3230
33- - (NCIconMapObject *) addIconMapObject ;
3431
35- - ( bool ) removeIconMapObject : (NCIconMapObject *) iconMapObject ;
32+ @property ( nonatomic , readonly ) NCLocationWindow* locationWindow ;
3633
37- - (NCFlatIconMapObject *) addFlatIconMapObject ;
3834
39- - ( bool ) removeFlatIconMapObject : (NCFlatIconMapObject *) iconMapObject ;
35+ // #pragma mark Memory Management
4036
41- - (NCPolylineMapObject *) addPolylineMapObject ;
37+ // /**
38+ // Reduce memory usage by freeing currently unused resources.
39+ // */
40+ // - (void)didReceiveMemoryWarning;
4241
43- - (bool ) removePolylineMapObject : (NCPolylineMapObject *) polylineMapObject ;
44-
45- - (void ) requestRender ;
46-
47- - (NCPoint*) screenPositionToMeters : (CGPoint)screenPosition ;
48-
49- - (CGPoint) metersToScreenPosition : (NCPoint *)meters clipToViewport : (BOOL )clip ;
50-
51- - (void ) pickMapObjectAt : (CGPoint)viewPosition ;
52-
53- - (void ) pickMapFeatureAt : (CGPoint)viewPosition ;
54-
55- - (void )applyFilter : (NSString *)filer layer : (NSString *)layer ;
56-
57- @property (assign , nonatomic ) CGFloat minZoomFactor;
58-
59- @property (assign , nonatomic ) CGFloat maxZoomFactor;
60-
61- @property (assign , nonatomic ) CGFloat zoomFactor;
62-
63- @property (assign , nonatomic ) BOOL stickToBorder;
64-
65- @property (strong , nonatomic , readonly ) CADisplayLink *displayLink;
66-
67- @property (assign , nonatomic ) NSInteger preferredFramesPerSecond;
68-
69- @property (weak , nonatomic , nullable ) id <NCPickListener> pickListener;
70-
71- @property (weak , nonatomic , nullable ) id <NCLocationViewListener> locationViewListener;
72-
73- /* *
74- If `continuous` is `YES`, the map view will re-draw continuously. Otherwise, the map will re-draw only when an event
75- changes the map view.
76-
77- @note Changing this property will override the inferred value from the scene. Enabling continuous rendering can
78- significantly increase the energy usage of an application.
79- */
80- @property (assign , nonatomic ) BOOL continuous;
81-
82- #pragma mark Gesture Recognizers
83-
84- @property (weak , nonatomic , nullable ) id <NCGestureRecognizerDelegate> gestureDelegate;
85-
86- /* *
87- Replaces the tap gesture recognizer used by the map view and adds it to the UIView.
88- */
89- @property (strong , nonatomic ) UITapGestureRecognizer* tapGestureRecognizer;
90-
91- /* *
92- Replaces the double tap gesture recognizer used by the map view and adds it to the UIView.
93- */
94- @property (strong , nonatomic ) UITapGestureRecognizer* doubleTapGestureRecognizer;
95-
96- /* *
97- Replaces the pan gesture recognizer used by the map view and adds it to the UIView.
98- */
99- @property (strong , nonatomic ) UIPanGestureRecognizer* panGestureRecognizer;
100-
101- /* *
102- Replaces the pinch gesture recognizer used by the map view and adds it to the UIView.
103- */
104- @property (strong , nonatomic ) UIPinchGestureRecognizer* pinchGestureRecognizer;
105-
106- /* *
107- Replaces the rotation gesture recognizer used by the map view and adds it to the UIView.
108- */
109- @property (strong , nonatomic ) UIRotationGestureRecognizer* rotationGestureRecognizer;
110-
111- /* *
112- Replaces the shove gesture recognizer used by the map view and adds it to the UIView.
113- */
114- @property (strong , nonatomic ) UIPanGestureRecognizer* shoveGestureRecognizer;
115-
116- /* *
117- Replaces the long press gesture recognizer used by the map view and adds it to the UIView.
118- */
119- @property (strong , nonatomic ) UILongPressGestureRecognizer* longPressGestureRecognizer;
120-
121- #pragma mark Change View
122-
123- @property (copy , nonatomic ) NCCamera* camera;
124-
125- /* *
126- Set the radius in logical pixels to use when picking features on the map (default is `0.5`).
127-
128- The `-pick*` methods will retrieve all `interactive` map objects from a circular area with this radius around the pick
129- location. Setting a larger radius can help ensure that desired features are retrieved from an imprecise touch input.
130-
131- @param pixels The pick radius in logical pixels.
132- */
133- - (void )setPickRadius : (CGFloat)pixels ;
134-
135- /* *
136- Move the map camera to a new position with an easing animation.
137-
138- @param camera The new camera position
139- @param duration The animation duration in milliseconds
140- @param animationType The type of easing animation
141- @param completion A callback to execute when the animation completes
142- */
143- - (void )setCamera : (NCCamera *)camera
144- withDuration : (NSInteger )duration
145- animationType : (NCAnimationType)animationType
146- completion : (nullable void (^)(BOOL canceled))completion;
147-
148- /* *
149- Move the map camera to a new position with an animation that pans and zooms in a smooth arc.
150-
151- The animation duration is calculated based on the distance to the new camera position assuming a speed scaling factor of 1.0
152-
153- @param camera The new camera position
154- @param callback A callback to execute when the animation completes
155- */
156- - (void )flyToCamera : (NCCamera *)camera
157- callback : (nullable void (^)(BOOL canceled))callback;
158-
159- /* *
160- Move the map camera to a new position with an animation that pans and zooms in a smooth arc.
161-
162- @param camera The new camera position
163- @param duration Duration of the animation in milliseconds
164- @param callback A callback to execute when the animation completes
165- */
166- - (void )flyToCamera : (NCCamera *)camera
167- withDuration : (NSInteger )duration
168- callback : (nullable void (^)(BOOL canceled))callback;
169-
170- /* *
171- Move the map camera to a new position with an animation that pans and zooms in a smooth arc.
172-
173- The animation duration is calculated based on the distance to the new camera position and the specified speed
174-
175- @param camera The new camera position
176- @param speed Specified speed scaling factor
177- @param callback A callback to execute when the animation completes
178- */
179- - (void )flyToCamera : (NCCamera *)camera
180- withSpeed : (CGFloat)speed
181- callback : (nullable void (^)(BOOL canceled))callback;
182-
183- #pragma mark Memory Management
184-
185- /* *
186- Reduce memory usage by freeing currently unused resources.
187- */
188- - (void )didReceiveMemoryWarning ;
189-
190- - (bool ) mapObjectSetVisible : (int32_t ) id visible : (bool ) visible ;
191- - (bool ) mapObjectSetInteractive : (int32_t ) id interactive : (bool ) interactive ;
192- - (bool ) mapObjectSetStyling : (int32_t ) id style : (NSString *) style ;
193- - (bool ) mapObjectSetTitle : (int32_t ) id title : (NSString *) title ;
194- - (bool ) mapObjectSetPosition : (int32_t ) id position : (NCLocationPoint*) locationPoint ;
195- - (bool ) mapObjectSetPositionAnimated : (int32_t ) id position : (NCLocationPoint*) locationPoint duration : (float ) duration type : (NCAnimationType) type ;
196- - (bool ) mapObjectSetAngle : (int32_t ) id angle : (float ) angle ;
197- - (bool ) mapObjectSetAngleAnimated : (int32_t ) id angle : (float ) angle duration : (float ) duration type : (NCAnimationType) type ;
198- - (bool ) mapObjectSetBitmap : (int32_t ) id ;
199- - (bool ) mapObjectSetPolyline : (int32_t ) id polyline : (NCLocationPolyline*) polyline ;
200- - (bool ) mapObjectSetSize : (int32_t ) id width : (float ) width height : (float ) height ;
201- - (bool ) mapObjectSetRadius : (int32_t ) id radius : (float ) radius ;
202- - (bool ) mapObjectSetWidth : (int32_t ) id width : (float ) width ;
203- - (bool ) mapObjectSetColor : (int32_t ) id red : (float ) red green : (float ) green blue : (float ) blue alpha : (float ) alpha ;
20442
20543@end
20644
0 commit comments