美文网首页
WhirlyGlobe初识(二)

WhirlyGlobe初识(二)

作者: 小熊_07cb | 来源:发表于2021-01-27 23:35 被阅读0次

一、文字

MaplyScreenLabel     用于绘制文字
1、常用属性:
/** 
    地图位置
  */
@property (nonatomic,assign) MaplyCoordinate loc;

/** 
    大小
  */
@property (nonatomic,assign) CGSize size;
/** 
图片
  */
@property (nonatomic,strong) id  __nullable image;

/** 
   图片数组
  */
@property (nonatomic,strong) NSArray * __nullable images;
/** 
    颜色
  */
@property (nonatomic,strong) UIColor * __nullable color;

/** 
  
 */
@property (nonatomic,assign) float layoutImportance;

/** 

  */
@property (nonatomic,assign) CGSize layoutSize;

/** 
   偏移量
  */
@property (nonatomic,assign) CGPoint offset;
/** 
    是否开启用户交互,默认开启
 */
@property (nonatomic,assign) bool selectable;
/** 
    一个对象,用于传递信息
 */
@property (nonatomic,strong) id  __nullable userObject;

2、基本用法

二、图片

MaplyScreenMarker   用于绘制图片
1、常用属性
/** 
    Location of the screen label in geographic (lat/lon) in radians.
    
    The screen label will track this position.  If it would be behind the globe (in globe mode), then it will disappear.
  */
@property (nonatomic,assign) MaplyCoordinate loc;

/** 
    An optional rotation to apply to the screen label.
    
    This is a rotation we'll apply after the screen position has been calculated.  You can use this to do things like track the orientation of roads.
    
    Rotation is in radians counter-clockwise from north.
  */
@property (nonatomic,assign) float rotation;

/** 
    When the screen is rotated, try to keep the label upright.
    
    This tells the layout and display engine to keep the label oriented upright no matter what.  In practice this means it will manipulate the rotation by 180 degrees.
  */
@property (nonatomic,assign) bool keepUpright;

/** 
    The actual text to display.
    
    This is a simple NSString for the text.  Things like font are set in the NSDictionary passed in to the add call in the view controller.
  */
@property (nonatomic,strong) NSString * __nullable text;

/** 
    Text can be accompanied by an optional icon image.
    
    If set, we'll put this image to the left of the text in the screen label.  The UIImage will be tracked by the view controller and reused as needed or disposed of when no longer needed.
    
    The name had to change because Apple's private selector search is somewhat weak.
  */
@property (nonatomic,strong) UIImage * __nullable iconImage2;

/** 
    Icon size in points.
    
    If there is an icon image, this is how big it is.
  */
@property (nonatomic,assign) CGSize iconSize;

/** 
    An optional offset for the whole screen label.
    
    If set, we'll move the screen label around by this amount before rendering it.  These are screen coordinates, not geographic.
  */
@property (nonatomic,assign) CGPoint offset;

/** 
    An option color override.
    
    If set, this color will override the color passed in with the NSDictionary in the view controller's add method.
  */
@property (nonatomic,strong) UIColor * __nullable color;

/** 
    Label selectability.  On by default
    
    If set, this label can be selected by the user.  If not set, this screen label will never appear in selection results.
  */
@property (nonatomic,assign) bool selectable;

/** 

 */
@property (nonatomic,assign) float layoutImportance;
/** 
一个对象,用于传递信息
  */
@property (nonatomic,strong) id  __nullable userObject;
2、基本用法

相关文章

  • WhirlyGlobe初识(二)

    一、文字 二、图片

  • WhirlyGlobe初识(一)

    直线 虚线覆盖物折现圆多边形

  • WhirlyGlobe 常用属性

    主要是这个类 MaplySharedAttributes.h

  • 初识(二)

    知道分班结果之后,我们这些准高一的“小鲜肉”又按照要求回到了操场。按照班级站成一列纵队。最让我头疼的事情是,按...

  • 二、初识

    content_by_lua_block 上一节,我们用了content_by_lua_block在OpenRes...

  • 初识(二)

    趴在桌子上睡着的张磊一下子惊醒,刚刚的梦境太可怕了。梦里他是一只宠物猫,讨好的围着一个女人,而那女人竟然是刘香玉…...

  • 初识二

    那个出口离得并不远,我足底生风,片刻功夫就到了,让我惊奇的是,这个出口竟然没有门。我略微沉吟了一会,附近还是不见半...

  • 初识(二)

    简一很享受下班后的办公时光。 办公室的人陆陆续续地走了,敲键盘的声音、说话的声音、走路的声音渐渐少了,办公室逐渐变...

  • 初识四段戏

    一月初识最是干净 二月初识上了颜色 三月初识开始斑驳 四月初识便是褪去

  • 正则表达式

    Python正则表达式初识(一) Python正则表达式初识(二) Python正则表达式初识(三) Python...

网友评论

      本文标题:WhirlyGlobe初识(二)

      本文链接:https://www.haomeiwen.com/subject/tduazktx.html