BMKClusterAlgorithm.h 756 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. //
  2. // BMKClusterAlgorithm.h
  3. // IphoneMapSdkDemo
  4. //
  5. // Created by wzy on 15/9/15.
  6. // Copyright © 2015年 Baidu. All rights reserved.
  7. //
  8. #ifndef BMKClusterAlgorithm_h
  9. #define BMKClusterAlgorithm_h
  10. #import <Foundation/Foundation.h>
  11. #import "BMKClusterQuadtree.h"
  12. /**
  13. * 点聚合算法
  14. */
  15. @interface BMKClusterAlgorithm : NSObject
  16. ///所有的BMKQuadItem
  17. @property (nonatomic, readonly) NSMutableArray *quadItems;
  18. @property (nonatomic, readonly) BMKClusterQuadtree *quadtree;
  19. ///添加item
  20. - (void)addItem:(BMKClusterItem*)clusterItem;
  21. ///清除items
  22. - (void)clearItems;
  23. /**
  24. * cluster算法核心
  25. * @param zoom map的级别
  26. * @return BMKCluster数组
  27. */
  28. - (NSArray*)getClusters:(CGFloat) zoomLevel;
  29. @end
  30. #endif /* BMKClusterAlgorithm_h */