zoukankan      html  css  js  c++  java
  • MKMapView

    Accessing Map Properties

    @property(nonatomic) MKMapType mapType
    @property(nonatomic, getter=isZoomEnabled) BOOL zoomEnabled
    @property(nonatomic, getter=isScrollEnabled) BOOL scrollEnabled
    @property(nonatomic, getter=isPitchEnabled) BOOL pitchEnabled
    @property(nonatomic, getter=isRotateEnabled) BOOL rotateEnabled
    

    Accessing the Delegate

    @property(nonatomic, weak) id< MKMapViewDelegate > delegate
    

    Manipulating the Visible Portion of the Map

    @property(nonatomic) MKCoordinateRegion region
    @property(nonatomic) CLLocationCoordinate2D centerCoordinate
    @property(nonatomic) MKMapRect visibleMapRect
    
    - (void)setRegion:(MKCoordinateRegion)region animated:(BOOL)animated
    - (void)setCenterCoordinate:(CLLocationCoordinate2D)coordinate animated:(BOOL)animated
    - (void)showAnnotations:(NSArray *)annotations animated:(BOOL)animated
    - (void)setVisibleMapRect:(MKMapRect)mapRect animated:(BOOL)animate
    - (void)setVisibleMapRect:(MKMapRect)mapRect edgePadding:(UIEdgeInsets)insets animated:(BOOL)animate
    

    Configuring the Map’s Appearance

    @property(nonatomic, copy) MKMapCamera *camera
    @property(nonatomic) BOOL showsPointsOfInterest
    @property(nonatomic) BOOL showsBuildings
    
    - (void)setCamera:(MKMapCamera *)camera animated:(BOOL)animated
    

    Displaying the User’s Location

    @property(nonatomic) BOOL showsUserLocation
    @property(nonatomic, readonly, getter=isUserLocationVisible) BOOL userLocationVisible
    @property(nonatomic, readonly) MKUserLocation *userLocation
    @property(nonatomic) MKUserTrackingMode userTrackingMode
    
    - (void)setUserTrackingMode:(MKUserTrackingMode)mode animated:(BOOL)animated
    

    Annotating the Map

    @property(nonatomic, readonly) NSArray *annotations
    @property(nonatomic, readonly) CGRect annotationVisibleRect
    
    - (void)addAnnotation:(id<MKAnnotation>)annotation
    - (void)addAnnotations:(NSArray *)annotations
    - (void)removeAnnotation:(id<MKAnnotation>)annotation
    - (void)removeAnnotations:(NSArray *)annotations
    - (MKAnnotationView *)viewForAnnotation:(id<MKAnnotation>)annotation
    - (NSSet *)annotationsInMapRect:(MKMapRect)mapRect
    - (MKAnnotationView *)dequeueReusableAnnotationViewWithIdentifier:(NSString *)identifier
    

    Managing Annotation Selections

    @property(nonatomic, copy) NSArray *selectedAnnotations
    
    - (void)selectAnnotation:(id<MKAnnotation>)annotation animated:(BOOL)animated
    - (void)deselectAnnotation:(id<MKAnnotation>)annotation animated:(BOOL)animated
    

    Accessing Overlays

    @property(nonatomic, readonly) NSArray *overlays
    
    - (NSArray *)overlaysInLevel:(MKOverlayLevel)level
    - (MKOverlayRenderer *)rendererForOverlay:(id<MKOverlay>)overlay
    - (MKOverlayView *)viewForOverlay:(id<MKOverlay>)overlay
    

    Adding and Inserting Overlays

    - (void)addOverlay:(id<MKOverlay>)overlay level:(MKOverlayLevel)level
    - (void)addOverlays:(NSArray *)overlays level:(MKOverlayLevel)level
    - (void)addOverlay:(id<MKOverlay>)overlay
    - (void)addOverlays:(NSArray *)overlays
    - (void)insertOverlay:(id<MKOverlay>)overlay atIndex:(NSUInteger)index level:(MKOverlayLevel)level
    - (void)insertOverlay:(id<MKOverlay>)overlay atIndex:(NSUInteger)index
    - (void)insertOverlay:(id<MKOverlay>)overlay aboveOverlay:(id<MKOverlay>)sibling
    - (void)insertOverlay:(id<MKOverlay>)overlay belowOverlay:(id<MKOverlay>)sibling
    - (void)exchangeOverlay:(id<MKOverlay>)overlay1 withOverlay:(id<MKOverlay>)overlay2
    - (void)exchangeOverlayAtIndex:(NSUInteger)index1 withOverlayAtIndex:(NSUInteger)index2
    

    Removing Overlays

    - (void)removeOverlay:(id<MKOverlay>)overlay
    - (void)removeOverlays:(NSArray *)overlays
    

    Converting Map Coordinates

    - (CGPoint)convertCoordinate:(CLLocationCoordinate2D)coordinate toPointToView:(UIView *)view
    - (CLLocationCoordinate2D)convertPoint:(CGPoint)point toCoordinateFromView:(UIView *)view
    - (CGRect)convertRegion:(MKCoordinateRegion)region toRectToView:(UIView *)view
    - (MKCoordinateRegion)convertRect:(CGRect)rect toRegionFromView:(UIView *)view
    

    Adjusting Map Regions and Rectangles

    - (MKCoordinateRegion)regionThatFits:(MKCoordinateRegion)region
    - (MKMapRect)mapRectThatFits:(MKMapRect)mapRect
    - (MKMapRect)mapRectThatFits:(MKMapRect)mapRect edgePadding:(UIEdgeInsets)insets
    
  • 相关阅读:
    CUDA 函数前缀与存储器前缀讨论
    VC++控制台程序中使用定时器
    C++中的RTTI
    C/C++ 时间转换与表示
    [转]winsock和winsock2冲突
    自然归并排序 c++ (原创)
    关于CC++运行时库的多线程版本的工作记录
    关于sizeof(原)
    结构体最后的长度为0或1数组的作用(转载)
    CUDA中常见的错误:the launch timed out and was treminated.
  • 原文地址:https://www.cnblogs.com/zhongriqianqian/p/3979240.html
Copyright © 2011-2022 走看看