9 #import <UIKit/UIKit.h>
11 #import "QAnnotation.h"
12 #import "QAnnotationView.h"
13 #import "QOverlayView.h"
14 #import "QBasicMapViewLayer.h"
16 #import "QUserLocationPresentation.h"
17 #import "QTileOverlay.h"
18 #import "QCustomLayer.h"
22 #import "QMarkerViewDefines.h"
23 #import "QMaskingLayer.h"
25 typedef NS_ENUM(NSInteger, QUserTrackingMode)
27 QUserTrackingModeNone = 0,
28 QUserTrackingModeFollow = 1,
29 QUserTrackingModeFollowWithHeading = 2
32 typedef NS_ENUM(NSUInteger, QMapLogoAnchor)
34 QMapLogoAnchorRightBottom = 0,
35 QMapLogoAnchorLeftBottom,
36 QMapLogoAnchorLeftTop,
37 QMapLogoAnchorRightTop,
45 #pragma mark - QMapView
64 #pragma mark - Resources
71 + (void)loadPrefferedResourceFilesFromDirectory:(NSString *)path;
78 @property (nonatomic, weak) id<QMapViewDelegate>
delegate;
83 @property (nonatomic, assign) QMapType mapType;
93 - (void)setStyleType:(QMapStyleType)styleType DEPRECATED_ATTRIBUTE;
100 - (void)setMapStyle:(
int)styleType;
147 - (void)setCompassOffset:(CGPoint)offset;
157 - (void)setForeignLanguage:(QMapLanguage)language;
162 - (void)setWorldMapEnable:(BOOL)enable;
167 - (void)setMapViewRenderWhenDetachedFromWindowEnabled:(BOOL)enabled;
172 - (void)setMapViewRenderWhenAppInactiveEnabled:(BOOL)enabled;
177 - (void)setCenterOffsetY:(
float)offset __attribute__ ((deprecated("use - (
void)setCenterOffsetV2:(CGPoint)offset animated:(BOOL)animated instead")));
182 - (void)setCenterOffset:(CGPoint)offset __attribute__ ((deprecated("use - (
void)setCenterOffsetV2:(CGPoint)offset animated:(BOOL)animated instead")));
190 - (void)setCenterOffset:(CGPoint)offset animated:(BOOL)animated __attribute__ ((deprecated("use - (
void)setCenterOffsetV2:(CGPoint)offset animated:(BOOL)animated instead")));
203 - (void)setCenterOffsetV2:(CGPoint)offset animated:(BOOL)animated;
210 - (void)setLogoOffset:(CGPoint)offset DEPRECATED_ATTRIBUTE;
218 - (void)setLogoMargin:(CGPoint)margin anchor:(QMapLogoAnchor)anchor;
225 - (void)setLogoScale:(CGFloat)scale;
243 - (void)setScaleViewOffset:(CGPoint)offset;
259 - (void) setScaleViewFadeEnable:(BOOL)enable;
266 - (void)setRoadEventVisible:(BOOL)visible DEPRECATED_ATTRIBUTE;
273 - (void)setBuildingBlackList:(
QMapRect*)noBuildingList count:(
int)count;
286 - (void)setGLMapDefaultGroundColor:(UIColor *)defaultColor;
288 #pragma mark - MapStatus
301 - (void)setCenterCoordinate:(CLLocationCoordinate2D)coordinate animated:(BOOL)animated;
324 - (void)setMinZoomLevel:(CGFloat)minZoomLevel maxZoomLevel:(CGFloat)maxZoomLevel;
331 - (void)setZoomLevelMultiplierForZoomIn:(CGFloat)zoomInMultiplier zoomOut:(CGFloat)zoomOutMultiplier;
339 - (void)setZoomLevel:(CGFloat)zoomLevel animated:(BOOL)animated;
352 - (void)setRotation:(CGFloat)rotation animated:(BOOL)animated;
363 - (void)enableAutoMaxOverlooking:(BOOL)enable;
371 - (void)setOverlooking:(CGFloat)overlooking animated:(BOOL)animated;
385 - (void)setVisibleMapRect:(
QMapRect)mapRect animated:(BOOL)animated;
395 - (void)setVisibleMapRect:(
QMapRect)mapRect edgePadding:(UIEdgeInsets)insets animated:(BOOL)animated;
419 - (void)setRegion:(
QCoordinateRegion)region edgePadding:(UIEdgeInsets)insets animated:(BOOL)animated;
427 - (
QMapRect)mapRectThatFits:(
QMapRect)mapRect edgePadding:(UIEdgeInsets)insets;
439 containsCalloutView:(BOOL)bContainsCalloutView
440 annotations:(NSArray<
id<
QAnnotation> >*)annotations
441 edgePadding:(UIEdgeInsets)insets;
450 - (CGFloat)zoomLevelThatFits:(
QMapRect)mapRect edgePadding:(UIEdgeInsets)insets outCenterCoordinate:(CLLocationCoordinate2D *)outCoordinate;
458 -(void)setLimitMapRect:(
QMapRect)mapRect mode:(QMapLimitRectFitMode)mode;
477 - (CGPoint)glVertexForCoordinate:(CLLocationCoordinate2D)coordinate;
496 - (double)metersPerPointAtLatitude:(CLLocationDegrees)latitude zoomLevel:(CGFloat)zoomLevel;
498 #pragma mark - Gesture Control
508 @property (nonatomic, assign, getter = isKeepCenterDuringZoom) BOOL keepCenterDuringZoom;
535 #pragma mark - Coordinate Convert
544 - (CGPoint)convertCoordinate:(CLLocationCoordinate2D)coordinate toPointToView:(UIView *)view;
553 - (CLLocationCoordinate2D)convertPoint:(CGPoint)point toCoordinateFromView:(UIView *)view;
643 @property(nonatomic, readonly) CLAccuracyAuthorization accuracyAuthorization
API_AVAILABLE(ios(14));
648 @property(nonatomic, readonly) CLAuthorizationStatus authorizationStatus
API_AVAILABLE(ios(14));
661 - (void)setUserTrackingMode:(QUserTrackingMode)mode animated:(BOOL)animated;
671 - (void)setUserLocationHidden:(BOOL)hidden;
676 - (void)setUserLocationCompassHidden:(BOOL)hidden;
681 - (void)setUserLocationNavigationGravitylineHidden:(BOOL)hidden;
687 - (void)requestTempPrecisedLocation:(
QMapView *)mapView purposeKey:(NSString *)key completion:(
void(^)(NSError * error))completion API_AVAILABLE(ios(14));
720 - (void)addAnnotation:(
id <
QAnnotation>)annotation;
726 - (void)addAnnotations:(NSArray *)annotations;
732 - (void)removeAnnotation:(
id <
QAnnotation>)annotation;
738 - (void)removeAnnotations:(NSArray *)annotations;
752 - (
QAnnotationView *)dequeueReusableAnnotationViewWithIdentifier:(NSString *)identifier;
760 - (void)bringAnnotationToFront:(
id <
QAnnotation>)annotation DEPRECATED_ATTRIBUTE;
767 - (void)selectAnnotation:(
id <
QAnnotation>)annotation animated:(BOOL)animated;
774 - (void)deselectAnnotation:(
id <
QAnnotation>)annotation animated:(BOOL)animated;
782 - (void)showAnnotations:(NSArray<
id<
QAnnotation>> *)annotations edgePadding:(UIEdgeInsets)insets animated:(BOOL)animated;
787 #pragma mark - Overlay
803 - (void)addOverlay:(
id <
QOverlay>)overlay;
809 - (void)addOverlays:(NSArray<
id <
QOverlay>> *)overlays;
816 - (void)addMultiPolygons:(NSArray <
QPolygon *> *)polygons;
822 - (void)removeOverlay:(
id <
QOverlay>)overlay;
828 - (void)removeOverlays:(NSArray<
id <
QOverlay>> *)overlays;
843 - (void)showOverlays:(NSArray<
id<
QOverlay>> *)overlays edgePadding:(UIEdgeInsets)insets animated:(BOOL)animated;
851 - (void)showQMarkers:(NSArray<
QMarker *> *)markers edgePadding:(UIEdgeInsets)insets animated:(BOOL)animated;
856 #pragma mark - CustomLayer
877 #pragma mark - POILayer
887 - (void)addAOILayer:(
QAOILayer *)layer callback:(
void(^)(BOOL success))callback;
893 - (void)removeAOILayer:(
QAOILayer *)layer;
897 #pragma mark - QMaskingLayer
916 #pragma mark - Snapshot
927 - (UIImage *)takeSnapshot __attribute__ ((deprecated("use - (void)takeSnapshotInRect:(CGRect)rect completion:(
void (^)(UIImage *resultImage))completion instead")));
935 - (void)takeSnapshotInRect:(CGRect)rect completion:(
void (^)(UIImage *resultImage))completion;
944 - (void)takeSnapshotInRect:(CGRect)rect timeout:(CFTimeInterval)timeout completion:(
void (^)(UIImage *resultImage))completion;
954 - (void)takeSnapshotInRect:(CGRect)rect timeout:(CFTimeInterval)timeout afterScreenUpdates:(BOOL)afterUpdates completion:(
void (^)(UIImage *resultImage))completion;
958 #pragma mark - QPoiInfo
968 @property (nonatomic, copy) NSString *uid;
973 @property (nonatomic, copy) NSString *name;
978 @property (nonatomic, assign) CLLocationCoordinate2D coordinate;
990 @property (nonatomic, copy) NSString *levelName;
995 @property (nonatomic, copy) NSString *buildingGUID;
1000 @property (nonatomic, copy) NSString *buildingName;
1013 @property (nonatomic, copy) NSString *source;
1018 @property (nonatomic, copy) NSString *eventName;
1023 @property (nonatomic, copy) NSString *road;
1028 @property (nonatomic, copy) NSString *detail;
1033 @property (nonatomic, assign) NSTimeInterval startTime;
1038 @property (nonatomic, assign) NSTimeInterval endTime;
1043 @property (nonatomic, assign) NSTimeInterval updateTime;
1057 @property (nonatomic, copy) NSString *parentID;
1082 #pragma mark - QMapViewDelegate
1096 - (void)mapViewAuthenticationDidComplete:(
QMapView *)mapView;
1106 - (void)mapViewAuthentication:(
QMapView *)mapView didFailWithError:(NSError *)error;
1113 - (void)mapViewInitComplete:(
QMapView *)mapView;
1120 - (void)mapViewFirstRenderDidComplete:(
QMapView *)mapView;
1126 - (void)mapViewStatusChangesCompleted:(
QMapView *)mapView;
1132 - (void)mapViewDidMoveToCameraRestricted:(
QMapView *)mapView;
1140 - (void)mapViewDidFailLoadingMap:(
QMapView *)mapView withError:(NSError *)error;
1148 - (void)mapView:(
QMapView *)mapView regionWillChangeAnimated:(BOOL)animated gesture:(BOOL)bGesture;
1154 - (void)mapViewRegionChange:(
QMapView *)mapView;
1162 - (void)mapView:(
QMapView *)mapView regionDidChangeAnimated:(BOOL)animated gesture:(BOOL)bGesture;
1170 - (void)mapView:(
QMapView *)mapView willMoveAnimated:(BOOL)animated gesture:(BOOL)bGesture;
1178 - (void)mapView:(
QMapView *)mapView didMoveAnimated:(BOOL)animated gesture:(BOOL)bGesture;
1186 - (void)mapView:(
QMapView *)mapView willZoomAnimated:(BOOL)animated gesture:(BOOL)bGesture;
1194 - (void)mapView:(
QMapView *)mapView didZoomAnimated:(BOOL)animated gesture:(BOOL)bGesture;
1202 - (void)mapView:(
QMapView *)mapView scaleViewChanged:(CGFloat)unitLength;
1209 - (void)mapView:(
QMapView *)mapView gestureDidTrigger:(QGestureType)gestureType;
1218 - (void)mapView:(
QMapView *)mapView gestureDidEnd:(QGestureType)gestureType;
1224 - (void)mapViewDrawFrame:(
QMapView *)mapView;
1230 - (void)mapUpdateFinished:(
QMapView *)mapView;
1237 - (void)mapView:(
QMapView *)mapView didTapAtCoordinate:(CLLocationCoordinate2D)coordinate;
1251 - (void)mapView:(
QMapView *)mapView didTapOverlay:(
id<
QOverlay>)overlay __attribute__ ((deprecated("use - (
void)mapView:(
QMapView *)mapView didTapOverlay:(
id<
QOverlay>)overlay coordinate:(CLLocationCoordinate2D)coordinate instead")));
1261 - (void)mapView:(
QMapView *)mapView didTapOverlay:(
id<
QOverlay>)overlay coordinate:(CLLocationCoordinate2D)coordinate;
1268 - (void)mapView:(
QMapView *)mapView didTapMarkerOverlayCallout:(
QMarker *)markerOverlay;
1278 - (void)mapView:(
QMapView *)mapView markerOverlay:(
QMarker *)markerOverlay didChangeDragState:(QMarkerViewDragState)newState
1279 fromOldState:(QMarkerViewDragState)oldState;
1286 - (void)mapView:(
QMapView *)mapView didTapMyLocation:(CLLocationCoordinate2D)location;
1338 - (void)mapView:(
QMapView *)mapView annotationView:(
QAnnotationView *)view collidedViewsDidShow:(NSArray <UIView *> *)shownViews;
1346 - (void)mapView:(
QMapView *)mapView annotationView:(
QAnnotationView *)view collidedViewsDidHide:(NSArray <UIView *> *)hiddenViews;
1356 - (void)mapView:(
QMapView *)mapView annotationView:(
QAnnotationView *)view didChangeDragState:(QAnnotationViewDragState)newState
1357 fromOldState:(QAnnotationViewDragState)oldState;
1366 - (void)mapView:(
QMapView *)mapView annotationView:(
QAnnotationView *)view calloutAccessoryControlTapped:(UIControl *)control;
1388 - (void)mapView:(
QMapView *)mapView didAddOverlayViews:(NSArray *)overlayViews;
1394 - (void)mapViewWillStartLocatingUser:(
QMapView *)mapView;
1400 - (void)mapViewDidStopLocatingUser:(
QMapView *)mapView;
1408 - (void)mapView:(
QMapView *)mapView didUpdateUserLocation:(
QUserLocation *)userLocation fromHeading:(BOOL)fromHeading;
1414 - (void)mapView:(
QMapView *)mapView didFailToLocateUserWithError:(NSError *)error;
1422 - (void)mapView:(
QMapView *)mapView didChangeUserTrackingMode:(QUserTrackingMode)mode animated:(BOOL)animated;
1428 - (void)locationManagerDidChangeAuthorization:(
QMapView *)mapView;
1434 - (void)mapViewLogger:(
QMapView *)mapView logMessage:(NSString *)text;