OCMapView 1.0
Simple and easy to use clustering mapView.
Public Member Functions | Protected Attributes | Properties
OCAnnotation Class Reference

Annotation class which represents a Cluster. More...

#import <OCAnnotation.h>

Inheritance diagram for OCAnnotation:
<OCGrouping>

Public Member Functions

(id) - init
 Standard initializer.
(id) - initWithAnnotation:
 Init with annotations.
(NSArray *) - annotationsInCluster
 List of annotations in the cluster.
(void) - addAnnotation:
 Adds a single annotation to the cluster.
(void) - addAnnotations:
 Adds multiple annotations to the Cluster.
(void) - removeAnnotation:
 Removes a single annotation from the Cluster.
(void) - removeAnnotations:
 Removes multiple annotations from the Cluster.
(NSString *) - title
 Get the Title of the cluster.
(void) - setTitle:
 Set the Title of the cluster.
(NSString *) - subtitle
 Get the Subtitle of the cluster.
(void) - setSubtitle:
 Set the Subitle of the cluster.
(NSString *) - groupTag
 Get the GroupTag of the cluster.
(void) - setGroupTag:
 Set the GroupTag of the cluster.
(CLLocationCoordinate2D) - coordinate
 Get the coordinate of the cluster.
(void) - setCoordinate:
 Set the coordinate of the cluster.

Protected Attributes

NSMutableArray * annotationsInCluster
NSString * title
NSString * subtitle
NSString * _groupTag
CLLocationCoordinate2D coordinate

Properties

NSArray * annotationsInCluster
 List of annotations in the cluster.

Detailed Description

Annotation class which represents a Cluster.

OCAnnotation stores all annotations which are in its area. Objects of this class will be returned by the delegate method of OCMapView "viewForAnnotation". Implements MKAnnotation protocol.

Definition at line 17 of file OCAnnotation.h.


Member Function Documentation

- (void) addAnnotation: (id < MKAnnotation >)  annotation

Adds a single annotation to the cluster.

Adds a given annotation to the cluster and sets the title to the number of containing annotations.

Definition at line 65 of file OCAnnotation.m.

- (void) addAnnotations: (NSArray *)  annotations

Adds multiple annotations to the Cluster.

Adds multiple annotations to the cluster and sets the title to the number of containing annotations. Calls addAnnotation in a loop.

Definition at line 73 of file OCAnnotation.m.

- (NSArray *) annotationsInCluster

List of annotations in the cluster.

annotationsInCluster property

- (CLLocationCoordinate2D) coordinate

Get the coordinate of the cluster.

- (NSString *) groupTag

Get the GroupTag of the cluster.

Reimplemented from <OCGrouping>.

Definition at line 120 of file OCAnnotation.m.

- (id) init

Standard initializer.

Definition at line 15 of file OCAnnotation.m.

- (id) initWithAnnotation: (id <MKAnnotation>)  annotation

Init with annotations.

Init object with containing annotations

Definition at line 27 of file OCAnnotation.m.

- (void) removeAnnotation: (id < MKAnnotation >)  annotation

Removes a single annotation from the Cluster.

Removes a given annotation from the cluster and sets the title to the number of containing annotations.

Definition at line 81 of file OCAnnotation.m.

- (void) removeAnnotations: (NSArray *)  annotations

Removes multiple annotations from the Cluster.

Removes multiple annotations from the cluster and sets the title to the number of containing annotations.

Definition at line 90 of file OCAnnotation.m.

- (void) setCoordinate: (CLLocationCoordinate2D)  coord

Set the coordinate of the cluster.

Definition at line 134 of file OCAnnotation.m.

- (void) setGroupTag: (NSString *)  tag

Set the GroupTag of the cluster.

Definition at line 124 of file OCAnnotation.m.

- (void) setSubtitle: (NSString *)  text

Set the Subitle of the cluster.

Definition at line 114 of file OCAnnotation.m.

- (void) setTitle: (NSString *)  text

Set the Title of the cluster.

Definition at line 104 of file OCAnnotation.m.

- (NSString *) subtitle

Get the Subtitle of the cluster.

- (NSString *) title

Get the Title of the cluster.


Field Documentation

- (NSString*) _groupTag [protected]

Definition at line 21 of file OCAnnotation.h.

- (NSArray *) annotationsInCluster [protected]

Definition at line 18 of file OCAnnotation.h.

- (CLLocationCoordinate2D) coordinate [protected]

Definition at line 22 of file OCAnnotation.h.

- (NSString *) subtitle [protected]

Definition at line 20 of file OCAnnotation.h.

- (NSString *) title [protected]

Definition at line 19 of file OCAnnotation.h.


Property Documentation

- (NSArray*) annotationsInCluster [read, assign]

List of annotations in the cluster.

Returns all annotations in the cluster. READONLY

Definition at line 38 of file OCAnnotation.h.


The documentation for this class was generated from the following files:
 All Data Structures Files Functions Variables Enumerations Enumerator Properties