WhirlyGlobe  1.1
A 3D interactive globe toolkit for ios
LabelLayer Class Reference

#import <LabelLayer.h>

Inheritance diagram for LabelLayer:
<WhirlyGlobeLayer>

List of all members.

Public Member Functions

(void) - startWithThread:scene:
 Called in the layer thread.
(WhirlyGlobe::SimpleIdentity) - addLabel:loc:desc:
(WhirlyGlobe::SimpleIdentity) - addLabels:desc:
(WhirlyGlobe::SimpleIdentity) - addLabel:
(void) - changeLabel:desc:
(DrawCost *) - getCost:
(void) - removeLabel:
 Remove the given label group by ID.

Protected Attributes

WhirlyGlobeLayerThreadlayerThread
WhirlyGlobe::GlobeScenescene
WhirlyGlobe::LabelSceneRepMap labelReps
 Keep track of labels (or groups of labels) by ID for deletion.

Detailed Description

The Label Layer will represent and manage groups of labels. You can hand it a list of labels to display and it will group those in to associated drawables. You want to give it a group for speed. Labels are currently drawn in Quartz, compiled into texture atlases and drawn together. This will change in the future to use font textures.

When you add a group of labels you will get back a unique ID which can be used to modify or delete all those labels at once.

The label display can be controlled via the individual SingleLabel objects as well as overall look and feel with the label description dictionary. That dictionary can contain the following:

  • enable [NSNumber bool]
  • drawOffset [NSNumber int]
  • drawPriority [NSNumber int]
  • label [NSString]
  • textColor [UIColor]
  • backgroundColor [UIColor]
  • font [UIFont]
  • width [NSNumber float] [In display coordinates, not geo]
  • height [NSNumber float]
  • minVis [NSNumber float]
  • maxVis [NSNumber float]
  • justify [NSString>] middle, left, right

Member Function Documentation

- WhirlyGlobe: (SingleLabel *)  label

Add a single label with the SingleLabel object. The desc dictionary in that object will specify the look

- WhirlyGlobe: (NSString *)  str
loc: (WhirlyGlobe::GeoCoord loc
desc: (NSDictionary *)  desc 

Create a label at the given coordinates, with the given look and feel. You get an ID for the label back so you can delete or modify it later. If you have more than one label, call addLabels instead.

- WhirlyGlobe: (NSArray *)  labels
desc: (NSDictionary *)  desc 

Add a whole list of labels (represented by SingleLabel objects) with the given look and feel. You get the ID identifying the whole group for modification or deletion

- (void) changeLabel: (WhirlyGlobe::SimpleIdentity)  labelID
desc: (NSDictionary *)  dict 

Change the display of a given label accordingly to the desc dictionary. Only minVis and maxVis are supported

- (DrawCost *) getCost: (WhirlyGlobe::SimpleIdentity)  labelID

Return the cost of a given label group (number of drawables and textures). Only call this in the layer thread


The documentation for this class was generated from the following file: