SGARViewDataSource


Responsible for providing all the annotations and their views.

Extends Protocol: NSObject
Declared In: SGARView.h



Methods

-arView:annotationsAtLocation:

Provides the annotations for the location.

-arView:didAddAnnotationViews:

Notifies the delegate when SGAnnotationViews have been added to the arView.

-arView:viewForAnnotation:

Provides the view for the specified annotation .


arView:annotationsAtLocation:


Provides the annotations for the location.

- (NSArray*) arView:(SGARView*)arView annotationsAtLocation:(CLLocation*)location; 
Parameters
arView

The AR view that needs annotations.

location

The location.

Return Value

An array of annotations.


arView:didAddAnnotationViews:


Notifies the delegate when SGAnnotationViews have been added to the arView.

- (void) arView:(SGARView*)arView didAddAnnotationViews:(NSArray*)views; 
Parameters
arView

The SGARView that added the annotation views.

views

The annotation views.


arView:viewForAnnotation:


Provides the view for the specified annotation.

- (SGAnnotationView*) arView:(SGARView*)arView 
        viewForAnnotation:(id<MKAnnotation>)annotation; 
Parameters
arView

The AR view that needs views for its annotaitons.

annotation

The annotation that needs a view.

Return Value

The view for the annotation.

Discussion

This allows the data source to prepare the annotation for display (e.g. changing location, title). You can also return a nil value which would not display a view for the specified annotation.

© SimpleGeo Last Updated: 03/31/2010