BMKPolyline.h 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. /*
  2. * BMKPolyline.h
  3. * BMapKit
  4. *
  5. * Copyright 2011 Baidu Inc. All rights reserved.
  6. *
  7. */
  8. #import "BMKMultiPoint.h"
  9. #import "BMKOverlay.h"
  10. /// 此类用于定义一段折线
  11. @interface BMKPolyline : BMKMultiPoint <BMKOverlay>
  12. /**
  13. *根据指定坐标点生成一段折线
  14. *@param points 指定的直角坐标点数组
  15. *@param count 坐标点的个数
  16. *@return 新生成的折线对象
  17. */
  18. + (BMKPolyline *)polylineWithPoints:(BMKMapPoint *)points count:(NSUInteger)count;
  19. /**
  20. *根据指定坐标点生成一段折线
  21. *@param coords 指定的经纬度坐标点数组
  22. *@param count 坐标点的个数
  23. *@return 新生成的折线对象
  24. */
  25. + (BMKPolyline *)polylineWithCoordinates:(CLLocationCoordinate2D *)coords count:(NSUInteger)count;
  26. /**
  27. *重新设置折线坐标点
  28. *@param points 指定的直角坐标点数组
  29. *@param count 坐标点的个数
  30. *@return 是否设置成功
  31. */
  32. - (BOOL)setPolylineWithPoints:(BMKMapPoint *)points count:(NSInteger) count;
  33. /**
  34. *重新设置折线坐标点
  35. *@param coords 指定的经纬度坐标点数组
  36. *@param count 坐标点的个数
  37. *@return 是否设置成功
  38. */
  39. - (BOOL)setPolylineWithCoordinates:(CLLocationCoordinate2D *)coords count:(NSInteger) count;
  40. #pragma mark - 以下方法和属性只适用于分段纹理绘制和分段颜色绘制
  41. ///纹理索引数组(颜色索引数组)
  42. @property (nonatomic, strong) NSArray *textureIndex;
  43. /**
  44. *分段纹理绘制/分段颜色绘制,根据指定坐标点生成一段折线
  45. *
  46. *分段纹理绘制:其对应的BMKPolylineView必须使用 - (BOOL)loadStrokeTextureImages:(NSArray *)textureImages; 加载纹理图片;否则使用默认的灰色纹理绘制
  47. *分段颜色绘制:其对应的BMKPolylineView必须设置colors属性
  48. *
  49. *@param points 指定的直角坐标点数组
  50. *@param count 坐标点的个数
  51. *@param textureIndex 纹理索引数组(颜色索引数组),成员为NSNumber,且为非负数,负数按0处理
  52. *@return 新生成的折线对象
  53. */
  54. + (BMKPolyline *)polylineWithPoints:(BMKMapPoint *)points count:(NSUInteger)count textureIndex:(NSArray*) textureIndex;
  55. /**
  56. *根据指定坐标点生成一段折线
  57. *
  58. *分段纹理绘制:其对应的BMKPolylineView必须使用 - (BOOL)loadStrokeTextureImages:(NSArray *)textureImages; 加载纹理图片;否则使用默认的灰色纹理绘制
  59. *分段颜色绘制:其对应的BMKPolylineView必须设置colors属性
  60. *
  61. *@param coords 指定的经纬度坐标点数组
  62. *@param count 坐标点的个数
  63. *@param textureIndex 纹理索引数组(颜色索引数组),成员为NSNumber,且为非负数,负数按0处理
  64. *@return 新生成的折线对象
  65. */
  66. + (BMKPolyline *)polylineWithCoordinates:(CLLocationCoordinate2D *)coords count:(NSUInteger)count textureIndex:(NSArray*) textureIndex;
  67. /**
  68. *重新设置折线坐标点 和 纹理索引
  69. *@param points 指定的直角坐标点数组
  70. *@param count 坐标点的个数
  71. *@param textureIndex 纹理索引数组(颜色索引数组),成员为NSNumber,且为非负数,负数按0处理
  72. *@return 是否设置成功
  73. */
  74. - (BOOL)setPolylineWithPoints:(BMKMapPoint *)points count:(NSInteger) count textureIndex:(NSArray*) textureIndex;
  75. /**
  76. *重新设置折线坐标点
  77. *@param coords 指定的经纬度坐标点数组
  78. *@param count 坐标点的个数
  79. *@param textureIndex 纹理索引数组(颜色索引数组),成员为NSNumber,且为非负数,负数按0处理
  80. *@return 是否设置成功
  81. */
  82. - (BOOL)setPolylineWithCoordinates:(CLLocationCoordinate2D *)coords count:(NSInteger) count textureIndex:(NSArray*) textureIndex;
  83. @end