Skip to content

Commit

Permalink
Merge pull request #8 from Navigine/Release20231013
Browse files Browse the repository at this point in the history
Release20231013
  • Loading branch information
PavelTychinin authored Oct 13, 2023
2 parents aed63ef + 4e2c0e0 commit c8b5b9a
Show file tree
Hide file tree
Showing 51 changed files with 1,064 additions and 751 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
All notable changes to this project will be documented in this file.
`navigine.framework` adheres to [Semantic Versioning](http://semver.org/).

## [2.4.0](https://github.com/Navigine/navigine_ios_framework/releases/tag/v.2.4.0) / 2023-10-13
* Refactor LocationView
* customization methods moved to LocationWindow
* New PickListener and InputListener

## [2.3.2](https://github.com/Navigine/navigine_ios_framework/releases/tag/v.2.3.2) / 2023-08-21
* Improved indoor positioning algorithm

Expand Down
8 changes: 4 additions & 4 deletions Frameworks/Navigine.xcframework/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<array>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64</string>
<string>ios-arm64-simulator</string>
<key>LibraryPath</key>
<string>Navigine.framework</string>
<key>SupportedArchitectures</key>
Expand All @@ -15,10 +15,12 @@
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64-simulator</string>
<string>ios-arm64</string>
<key>LibraryPath</key>
<string>Navigine.framework</string>
<key>SupportedArchitectures</key>
Expand All @@ -27,8 +29,6 @@
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
</array>
<key>CFBundlePackageType</key>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// AUTOGENERATED FILE - DO NOT MODIFY!
// This file was generated by Djinni from location_window.djinni

#import "NCExport.h"
#import <Foundation/Foundation.h>



typedef void (^NCCameraCallback)(BOOL completed);

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// AUTOGENERATED FILE - DO NOT MODIFY!
// This file was generated by Djinni from camera_listener.djinni

#import "NCCameraUpdateReason.h"
#import "NCExport.h"
#import <Foundation/Foundation.h>


DEFAULT_EXPORT_ATTRIBUTE
@protocol NCCameraListener <NSObject>

- (void)onCameraPositionChanged:(NCCameraUpdateReason)reason
finished:(BOOL)finished;

@end
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// AUTOGENERATED FILE - DO NOT MODIFY!
// This file was generated by Djinni from camera_listener.djinni

#import <Foundation/Foundation.h>

typedef NS_ENUM(NSInteger, NCCameraUpdateReason)
{
NCCameraUpdateReasonGestures,
NCCameraUpdateReasonApplication,
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// AUTOGENERATED FILE - DO NOT MODIFY!
// This file was generated by Djinni from debug_flag.djinni

#import <Foundation/Foundation.h>

typedef NS_ENUM(NSInteger, NCDebugFlag)
{
NCDebugFlagNone,
NCDebugFlagInfos,
NCDebugFlagStats,
NCDebugFlagLabels,
NCDebugFlagDrawAllLabels,
NCDebugFlagSelectionBuffer,
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// AUTOGENERATED FILE - DO NOT MODIFY!
// This file was generated by Djinni from input_listener.djinni

#import "NCExport.h"
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>


DEFAULT_EXPORT_ATTRIBUTE
@protocol NCInputListener <NSObject>

- (void)onViewTap:(CGPoint)screenPoint;

- (void)onViewDoubleTap:(CGPoint)screenPoint;

- (void)onViewLongTap:(CGPoint)screenPoint;

@end
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#import <UIKit/UIKit.h>
#import "NCExport.h"
#import "NCAnimationType.h"
#import "NCLocationWindow.h"

NS_ASSUME_NONNULL_BEGIN

Expand All @@ -13,194 +14,31 @@ NS_ASSUME_NONNULL_BEGIN
@class NCPoint;
@class NCCamera;

@protocol NCGestureRecognizerDelegate;
@protocol NCLocationViewListener;
@protocol NCPickListener;

DEFAULT_EXPORT_ATTRIBUTE
@interface NCLocationView : UIView

- (instancetype)initWithFrame:(CGRect)frame;
- (id)initWithCoder:(NSCoder *)aDecoder;

- (void) setSublocationId: (int) sublocationId;
- (id)initWithFrame:(CGRect)frame;

- (void) removeAllMapObjects;
// - (void)applyFilter:(NSString *)filer layer:(NSString *)layer;

- (NCCircleMapObject *) addCircleMapObject;

- (bool) removeCircleMapObject: (NCCircleMapObject *) circleMapObject;
// @property (weak, nonatomic, nullable) id<NCLocationViewListener> locationViewListener;

- (NCIconMapObject *) addIconMapObject;

- (bool) removeIconMapObject: (NCIconMapObject *) iconMapObject;
@property (nonatomic, readonly) NCLocationWindow* locationWindow;

- (NCFlatIconMapObject *) addFlatIconMapObject;

- (bool) removeFlatIconMapObject: (NCFlatIconMapObject *) iconMapObject;
// #pragma mark Memory Management

- (NCPolylineMapObject *) addPolylineMapObject;
// /**
// Reduce memory usage by freeing currently unused resources.
// */
// - (void)didReceiveMemoryWarning;

- (bool) removePolylineMapObject: (NCPolylineMapObject *) polylineMapObject;

- (void) requestRender;

- (NCPoint*) screenPositionToMeters:(CGPoint)screenPosition;

- (CGPoint) metersToScreenPosition:(NCPoint *)meters clipToViewport:(BOOL)clip;

- (void) pickMapObjectAt:(CGPoint)viewPosition;

- (void) pickMapFeatureAt:(CGPoint)viewPosition;

- (void)applyFilter:(NSString *)filer layer:(NSString *)layer;

@property (assign, nonatomic) CGFloat minZoomFactor;

@property (assign, nonatomic) CGFloat maxZoomFactor;

@property (assign, nonatomic) CGFloat zoomFactor;

@property (assign, nonatomic) BOOL stickToBorder;

@property (strong, nonatomic, readonly) CADisplayLink *displayLink;

@property (assign, nonatomic) NSInteger preferredFramesPerSecond;

@property (weak, nonatomic, nullable) id<NCPickListener> pickListener;

@property (weak, nonatomic, nullable) id<NCLocationViewListener> locationViewListener;

/**
If `continuous` is `YES`, the map view will re-draw continuously. Otherwise, the map will re-draw only when an event
changes the map view.
@note Changing this property will override the inferred value from the scene. Enabling continuous rendering can
significantly increase the energy usage of an application.
*/
@property (assign, nonatomic) BOOL continuous;

#pragma mark Gesture Recognizers

@property (weak, nonatomic, nullable) id<NCGestureRecognizerDelegate> gestureDelegate;

/**
Replaces the tap gesture recognizer used by the map view and adds it to the UIView.
*/
@property (strong, nonatomic) UITapGestureRecognizer* tapGestureRecognizer;

/**
Replaces the double tap gesture recognizer used by the map view and adds it to the UIView.
*/
@property (strong, nonatomic) UITapGestureRecognizer* doubleTapGestureRecognizer;

/**
Replaces the pan gesture recognizer used by the map view and adds it to the UIView.
*/
@property (strong, nonatomic) UIPanGestureRecognizer* panGestureRecognizer;

/**
Replaces the pinch gesture recognizer used by the map view and adds it to the UIView.
*/
@property (strong, nonatomic) UIPinchGestureRecognizer* pinchGestureRecognizer;

/**
Replaces the rotation gesture recognizer used by the map view and adds it to the UIView.
*/
@property (strong, nonatomic) UIRotationGestureRecognizer* rotationGestureRecognizer;

/**
Replaces the shove gesture recognizer used by the map view and adds it to the UIView.
*/
@property (strong, nonatomic) UIPanGestureRecognizer* shoveGestureRecognizer;

/**
Replaces the long press gesture recognizer used by the map view and adds it to the UIView.
*/
@property (strong, nonatomic) UILongPressGestureRecognizer* longPressGestureRecognizer;

#pragma mark Change View

@property (copy, nonatomic) NCCamera* camera;

/**
Set the radius in logical pixels to use when picking features on the map (default is `0.5`).
The `-pick*` methods will retrieve all `interactive` map objects from a circular area with this radius around the pick
location. Setting a larger radius can help ensure that desired features are retrieved from an imprecise touch input.
@param pixels The pick radius in logical pixels.
*/
- (void)setPickRadius:(CGFloat)pixels;

/**
Move the map camera to a new position with an easing animation.
@param camera The new camera position
@param duration The animation duration in milliseconds
@param animationType The type of easing animation
@param completion A callback to execute when the animation completes
*/
- (void)setCamera:(NCCamera *)camera
withDuration:(NSInteger)duration
animationType:(NCAnimationType)animationType
completion:(nullable void (^)(BOOL canceled))completion;

/**
Move the map camera to a new position with an animation that pans and zooms in a smooth arc.
The animation duration is calculated based on the distance to the new camera position assuming a speed scaling factor of 1.0
@param camera The new camera position
@param callback A callback to execute when the animation completes
*/
- (void)flyToCamera:(NCCamera *)camera
callback:(nullable void (^)(BOOL canceled))callback;

/**
Move the map camera to a new position with an animation that pans and zooms in a smooth arc.
@param camera The new camera position
@param duration Duration of the animation in milliseconds
@param callback A callback to execute when the animation completes
*/
- (void)flyToCamera:(NCCamera *)camera
withDuration:(NSInteger)duration
callback:(nullable void (^)(BOOL canceled))callback;

/**
Move the map camera to a new position with an animation that pans and zooms in a smooth arc.
The animation duration is calculated based on the distance to the new camera position and the specified speed
@param camera The new camera position
@param speed Specified speed scaling factor
@param callback A callback to execute when the animation completes
*/
- (void)flyToCamera:(NCCamera *)camera
withSpeed:(CGFloat)speed
callback:(nullable void (^)(BOOL canceled))callback;

#pragma mark Memory Management

/**
Reduce memory usage by freeing currently unused resources.
*/
- (void)didReceiveMemoryWarning;

- (bool) mapObjectSetVisible:(int32_t) id visible: (bool) visible;
- (bool) mapObjectSetInteractive:(int32_t) id interactive:(bool) interactive;
- (bool) mapObjectSetStyling:(int32_t) id style: (NSString*) style;
- (bool) mapObjectSetTitle:(int32_t) id title: (NSString*) title;
- (bool) mapObjectSetPosition:(int32_t) id position: (NCLocationPoint*) locationPoint;
- (bool) mapObjectSetPositionAnimated:(int32_t) id position: (NCLocationPoint*) locationPoint duration: (float) duration type: (NCAnimationType) type;
- (bool) mapObjectSetAngle:(int32_t) id angle: (float) angle;
- (bool) mapObjectSetAngleAnimated:(int32_t) id angle: (float) angle duration: (float) duration type: (NCAnimationType) type;
- (bool) mapObjectSetBitmap:(int32_t) id;
- (bool) mapObjectSetPolyline:(int32_t) id polyline: (NCLocationPolyline*) polyline;
- (bool) mapObjectSetSize:(int32_t) id width: (float) width height: (float) height;
- (bool) mapObjectSetRadius:(int32_t) id radius: (float) radius;
- (bool) mapObjectSetWidth:(int32_t) id width: (float) width;
- (bool) mapObjectSetColor:(int32_t) id red: (float) red green: (float) green blue: (float) blue alpha: (float) alpha;

@end

Expand Down
Loading

0 comments on commit c8b5b9a

Please sign in to comment.