JMSGLocationContent.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. //
  2. // JMSGLocationContent.h
  3. // JMessage
  4. //
  5. // Created by dyh on 16/7/26.
  6. // Copyright © 2016年 HXHG. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import <JMessage/JMSGAbstractContent.h>
  10. /**
  11. * 地理位置内容类型
  12. */
  13. @interface JMSGLocationContent : JMSGAbstractContent <NSCopying>
  14. JMSG_ASSUME_NONNULL_BEGIN
  15. /*!
  16. * @abstract 纬度
  17. */
  18. @property(nonatomic, strong, readonly) NSNumber *latitude;
  19. /*!
  20. * @abstract 经度
  21. */
  22. @property(nonatomic, strong, readonly) NSNumber *longitude;
  23. /*!
  24. * @abstract 缩放
  25. */
  26. @property(nonatomic, strong, readonly) NSNumber *scale;
  27. /*!
  28. * @abstract 详细地址信息
  29. */
  30. @property(nonatomic, copy, readonly) NSString *address;
  31. // 不支持使用的初始化方法
  32. - (nullable instancetype)init NS_UNAVAILABLE;
  33. /**
  34. * 初始化地理位置消息内容
  35. *
  36. * @param latitude 纬度
  37. * @param longitude 经度
  38. * @param scale 缩放比例
  39. * @param address 详细地址信息
  40. *
  41. * @return 地理位置消息内容
  42. */
  43. - (instancetype)initWithLatitude:(NSNumber *)latitude
  44. longitude:(NSNumber *)longitude
  45. scale:(NSNumber *)scale
  46. address:(NSString *)address;
  47. JMSG_ASSUME_NONNULL_END
  48. @end