TencentMapSDK_iOS_3D_v1.3.3
|
地图view 更多...
#import <QMapView.h>
构造函数 | |
(void) | - setCenterCoordinate:animated: |
设定地图中心点经纬度 更多... | |
(id) | - initWithFrame: |
初始化场景地图 更多... | |
(void) | - setRegion:animated: |
设定当前地图的region 更多... | |
(void) | - setVisibleMapRect:animated: |
设置当前地图可见范围的mapRect 更多... | |
(void) | - setVisibleMapRect:edgePadding:animated: |
设置当前地图可见范围的mapRect 更多... | |
(QCoordinateRegion) | - regionThatFits: |
根据当前地图视图frame的大小调整region范围,返回适合当前地图frame的region,调整过程中当前地图的中心点不会改变 更多... | |
(QMapRect) | - mapRectThatFits: |
调整mapRect使其适合地图窗口显示的范围 更多... | |
(QMapRect) | - mapRectThatFits:edgePadding: |
调整mapRect使其适合地图窗口显示的范围 更多... | |
(void) | - setDisplayLauguage: |
指定底图文字显示的首选语言 更多... | |
(void) | - setZoomLevel:animated: |
设置当前地图缩放级别 更多... | |
(void) | - setCenterCoordinate:zoomLevel:animated: |
同时设置中心点与缩放级别 更多... | |
(CGPoint) | - convertCoordinate:toPointToView: |
将经纬度坐标转化为相对于指定view的坐标 更多... | |
(CLLocationCoordinate2D) | - convertPoint:toCoordinateFromView: |
将相对于view的坐标转化为经纬度坐标 更多... | |
(CGRect) | - convertRegion:toRectToView: |
将地图上的region转化为相对于view的rectangle 更多... | |
(QCoordinateRegion) | - convertRect:toRegionFromView: |
将相对于view的rectangle转化为region 更多... | |
(void) | - addAnnotation: |
向地图窗口添加标注,需要实现QMapViewDelegate的-mapView:viewForAnnotation:函数来生成标注对应的View 更多... | |
(void) | - addAnnotations: |
向地图窗口添加一组标注,需要实现QMapViewDelegate的-mapView:viewForAnnotation:函数来生成标注对应的View 更多... | |
(void) | - removeAnnotation: |
移除标注 更多... | |
(void) | - removeAnnotations: |
移除一组标注 更多... | |
(QAnnotationView *) | - viewForAnnotation: |
获取指定标注的view 更多... | |
(NSSet *) | - annotationsInMapRect: |
获取指定投影矩形范围内的标注 更多... | |
(QAnnotationView *) | - dequeueReusableAnnotationViewWithIdentifier: |
从复用内存池中获取制定复用标识的annotationView 更多... | |
(void) | - selectAnnotation:animated: |
选中标注对应的view 更多... | |
(void) | - deselectAnnotation:animated: |
取消选中标注对应的view 更多... | |
(void) | - showAnnotations:animated: |
设置地图使其可以显示数组中所有的标注 更多... | |
(void) | - setUserTrackingMode:animated: |
设置追踪用户位置的模式 更多... | |
(void) | - addOverlay: |
向地图窗口添加overlay,需要实现QMapViewDelegate的-mapView:viewForOverlay:函数来生成标注对应的view 更多... | |
(void) | - addOverlays: |
向地图窗口添加一组overlay,需要实现QMapViewDelegate的-mapView:viewForOverlay:函数来生成标注对应的view 更多... | |
(void) | - removeOverlay: |
移除overlay 更多... | |
(void) | - removeOverlays: |
移除一组overlay 更多... | |
(void) | - insertOverlay:atIndex: |
在指定的索引出添加一个overlay 更多... | |
(void) | - exchangeOverlayAtIndex:withOverlayAtIndex: |
交换指定索引处的overlay 更多... | |
(void) | - insertOverlay:aboveOverlay: |
在指定的overlay之上插入一个overlay 更多... | |
(void) | - insertOverlay:belowOverlay: |
在指定的overlay之下插入一个overlay 更多... | |
(QOverlayView *) | - viewForOverlay: |
查找指定overlay对应的View,如果该view尚未创建,返回nil 更多... | |
(UIImage *) | - takeSnapshotInRect: |
在指定区域内截图 更多... | |
(void) | - takeSnapshotInRect:withCompletionBlock: |
在指定区域内截图(异步) 更多... | |
属性 | |
id< QMapViewDelegate > | delegate |
地图view的delegate | |
QMapType | mapType |
地图类型 | |
BOOL | showTraffic |
是否显示交通, 默认为NO | |
BOOL | scrollEnabled |
是否支持平移, 默认为YES | |
BOOL | zoomEnabled |
是否支持缩放, 默认为YES | |
BOOL | keepCenterEnabled |
pinch时保持中心点, 默认为NO | |
BOOL | showsScale |
是否显示比例尺,默认为YES | |
CLLocationCoordinate2D | centerCoordinate |
当前地图的中心点经纬度坐标,改变该值时,地图缩放级别不会发生变化 | |
QCoordinateRegion | region |
当前地图的经纬度范围,设定的该范围可能会被调整为适合地图窗口显示的范围 | |
QMapRect | visibleMapRect |
当前地图可见范围的mapRect | |
double | zoomLevel |
地图缩放级别 | |
double | minZoomLevel |
最小缩放级别 | |
double | maxZoomLevel |
最大缩放级别 | |
NSArray * | annotations |
当前地图上的标注数组 | |
CGRect | annotationVisibleRect |
标注的可见区域 | |
NSArray * | selectedAnnotations |
处于选中状态的标注数据数据(其count == 0 或 1) | |
BOOL | showsUserLocation |
是否显示用户位置 | |
CLLocationDistance | distanceFilter |
最小移动距离(单位是米), 当大于该值时定位回调才触发, 默认为kCLDistanceFilterNone | |
QUserLocation * | userLocation |
当前用户位置数据 | |
BOOL | forceUpdatingHeading |
是否强制开启heading 更新, 默认为NO. | |
QUserTrackingMode | userTrackingMode |
定位用户位置的模式 | |
BOOL | userLocationVisible |
当前位置在地图中是否可见 | |
NSArray * | overlays |
当前地图上的overlay数组 | |
地图view
- (void) addAnnotation: | (id< QAnnotation >) | annotation |
向地图窗口添加标注,需要实现QMapViewDelegate的-mapView:viewForAnnotation:函数来生成标注对应的View
annotation | 要添加的标注 |
- (void) addAnnotations: | (NSArray *) | annotations |
向地图窗口添加一组标注,需要实现QMapViewDelegate的-mapView:viewForAnnotation:函数来生成标注对应的View
annotations | 要添加的标注数组 |
- (void) addOverlay: | (id< QOverlay >) | overlay |
向地图窗口添加overlay,需要实现QMapViewDelegate的-mapView:viewForOverlay:函数来生成标注对应的view
overlay | 要添加的overlay |
由 category QMapView(OverlaysAPI) 提供.
- (void) addOverlays: | (NSArray *) | overlays |
向地图窗口添加一组overlay,需要实现QMapViewDelegate的-mapView:viewForOverlay:函数来生成标注对应的view
overlays | 要添加的overlay数组 |
由 category QMapView(OverlaysAPI) 提供.
- (NSSet *) annotationsInMapRect: | (QMapRect) | mapRect |
获取指定投影矩形范围内的标注
mapRect | 投影矩形范围 |
- (CGPoint) convertCoordinate: | (CLLocationCoordinate2D) | coordinate | |
toPointToView: | (UIView *) | view | |
将经纬度坐标转化为相对于指定view的坐标
coordinate | 要转化的经纬度坐标 |
view | point所基于的view |
- (CLLocationCoordinate2D) convertPoint: | (CGPoint) | point | |
toCoordinateFromView: | (UIView *) | view | |
将相对于view的坐标转化为经纬度坐标
point | 要转化的坐标 |
view | point所基于的view |
- (QCoordinateRegion) convertRect: | (CGRect) | rect | |
toRegionFromView: | (UIView *) | view | |
将相对于view的rectangle转化为region
rect | 要转化的rectangle |
view | rectangle所基于的view |
- (CGRect) convertRegion: | (QCoordinateRegion) | region | |
toRectToView: | (UIView *) | view | |
将地图上的region转化为相对于view的rectangle
region | 要转化的region |
view | rectangle所基于的view |
- (QAnnotationView *) dequeueReusableAnnotationViewWithIdentifier: | (NSString *) | identifier |
从复用内存池中获取制定复用标识的annotationView
identifier | 复用标识 |
- (void) deselectAnnotation: | (id< QAnnotation >) | annotation | |
animated: | (BOOL) | animated | |
取消选中标注对应的view
annotation | 选择的标注 |
animated | 是否采用动画 |
- (void) exchangeOverlayAtIndex: | (NSUInteger) | index1 | |
withOverlayAtIndex: | (NSUInteger) | index2 | |
- (id) initWithFrame: | (CGRect) | frame |
初始化场景地图
frame | 设定的地图view框 |
- (void) insertOverlay: | (id< QOverlay >) | overlay | |
aboveOverlay: | (id< QOverlay >) | sibling | |
在指定的overlay之上插入一个overlay
overlay | 待添加的overlay |
sibling | 用于指定位置的overlay |
由 category QMapView(OverlaysAPI) 提供.
- (void) insertOverlay: | (id< QOverlay >) | overlay | |
atIndex: | (NSUInteger) | index | |
- (void) insertOverlay: | (id< QOverlay >) | overlay | |
belowOverlay: | (id< QOverlay >) | sibling | |
在指定的overlay之下插入一个overlay
overlay | 待添加的overlay |
sibling | 用于指定位置的overlay |
由 category QMapView(OverlaysAPI) 提供.
调整mapRect使其适合地图窗口显示的范围
mapRect | 需要调整的mapRect |
- (QMapRect) mapRectThatFits: | (QMapRect) | mapRect | |
edgePadding: | (UIEdgeInsets) | insets | |
调整mapRect使其适合地图窗口显示的范围
mapRect | 需要调整的mapRect |
insets | 要嵌入的边界 |
- (QCoordinateRegion) regionThatFits: | (QCoordinateRegion) | region |
根据当前地图视图frame的大小调整region范围,返回适合当前地图frame的region,调整过程中当前地图的中心点不会改变
region | 需要调整的region |
- (void) removeAnnotation: | (id< QAnnotation >) | annotation |
移除标注
annotation | 要移除的标注 |
- (void) removeAnnotations: | (NSArray *) | annotations |
移除一组标注
annotations | 要移除的标注数组 |
- (void) removeOverlay: | (id< QOverlay >) | overlay |
- (void) removeOverlays: | (NSArray *) | overlays |
- (void) selectAnnotation: | (id< QAnnotation >) | annotation | |
animated: | (BOOL) | animated | |
选中标注对应的view
annotation | 选择的标注 |
animated | 是否采用动画 |
- (void) setCenterCoordinate: | (CLLocationCoordinate2D) | coordinate | |
animated: | (BOOL) | animated | |
设定地图中心点经纬度
coordinate | 要设定的地图中心点经纬度 |
animated | 是否采用动画 |
- (void) setCenterCoordinate: | (CLLocationCoordinate2D) | coordinate | |
zoomLevel: | (double) | newZoomLevel | |
animated: | (BOOL) | animated | |
同时设置中心点与缩放级别
coordinate | 要设定的地图中心点经纬度 |
newZoomLevel | 目标缩放级别 |
animated | 是否采用动画 |
- (void) setDisplayLauguage: | (QMapLanguage) | language |
指定底图文字显示的首选语言
指定后底图会尽量用指定语言显示底图标注的文字,默认采用英语
lauguage | 指定的语言 |
- (void) setRegion: | (QCoordinateRegion) | region | |
animated: | (BOOL) | animated | |
设定当前地图的region
region | 要设定的地图范围,用经纬度的方式表示 |
animated | 是否采用动画 |
- (void) setUserTrackingMode: | (QUserTrackingMode) | mode | |
animated: | (BOOL) | animated | |
设置追踪用户位置的模式
mode | 要使用的模式 |
animated | 是否采用动画 |
- (void) setVisibleMapRect: | (QMapRect) | mapRect | |
animated: | (BOOL) | animated | |
设置当前地图可见范围的mapRect
mapRect | 目标mapRect |
animated | 是否采用动画 |
- (void) setVisibleMapRect: | (QMapRect) | mapRect | |
edgePadding: | (UIEdgeInsets) | insets | |
animated: | (BOOL) | animated | |
设置当前地图可见范围的mapRect
mapRect | 目标mapRect |
insets | 要嵌入的边界 |
animated | 是否采用动画 |
- (void) setZoomLevel: | (double) | newZoomLevel | |
animated: | (BOOL) | animated | |
设置当前地图缩放级别
newZoomLevel | 目标缩放级别 |
animated | 是否采用动画 |
- (void) showAnnotations: | (NSArray *) | annotations | |
animated: | (BOOL) | animated | |
设置地图使其可以显示数组中所有的标注
annotations | 需要显示的标注数组 |
animated | 是否采用动画 |
- (UIImage *) takeSnapshotInRect: | (CGRect) | rect |
- (void) takeSnapshotInRect: | (CGRect) | rect | |
withCompletionBlock: | (void(^)(UIImage *resultImage, CGRect rect)) | block | |
- (QAnnotationView *) viewForAnnotation: | (id< QAnnotation >) | annotation |
获取指定标注的view
annotation | 指定的标注 |
- (QOverlayView *) viewForOverlay: | (id< QOverlay >) | overlay |
查找指定overlay对应的View,如果该view尚未创建,返回nil
overlay | 指定的overlay |
由 category QMapView(OverlaysAPI) 提供.