Inherits from UIView
Declared in OSOverlayView.h

Overview

OSOverlayView provides the visual representation associated with an OSOverlay.

Subclasses are expected to implement drawGridRect:zoomScale:inContext, but concrete implementations are provided for each of the provided concrete OSOverlay objects.

Tasks

Other Methods

Other Methods

Properties

overlay

@property (nonatomic, strong, readonly) id<OSOverlay> overlay

Instance Methods

drawGridRect:zoomScale:inContext:

area to render

- (void)drawGridRect:(OSGridRect)gridRect zoomScale:(float)zoomScale inContext:(CGContextRef)context

Parameters

gridRect

area to render

zoomScale

measured in metres per pixel

content

to render in

The default implementation of this method does nothing. Subclasses should provide their own implementation, which should be thread-safe. Failure to only draw the area requested by gridRect and thereby render outside that rectangle may lead to performance problems.

Declared In

OSOverlayView.h

gridPointForPoint:

Convert a point in the view's coordinate space into a map point
- (OSGridPoint)gridPointForPoint:(CGPoint)point

Parameters

point

The point in the view’s coordinate space to convert

Declared In

OSOverlayView.h

gridRectForRect:

Convert a rect in the view’s coordinate space into a map rect

- (OSGridRect)gridRectForRect:(CGRect)rect

Parameters

rect

The rectangle in the view’s coordinate space to convert

Declared In

OSOverlayView.h

initWithOverlay:

- (id)initWithOverlay:(id<OSOverlay>)overlay

mapPointForPoint:

- (OSMapPoint)mapPointForPoint:(CGPoint)p

mapRectForRect:

- (OSMapRect)mapRectForRect:(CGRect)r

pointForGridPoint:

Convert a point on the map to a point in the view’s coordinate space

- (CGPoint)pointForGridPoint:(OSGridPoint)gridPoint

Parameters

point

The point on the map to convert

Declared In

OSOverlayView.h

pointForMapPoint:

- (CGPoint)pointForMapPoint:(OSMapPoint)mapPoint

rectForGridRect:

Convert a rectangle on the map to a point in the view’s coordinate space

- (CGRect)rectForGridRect:(OSGridRect)gridRect

Parameters

gridRect

The rectangle on the map to convert

Declared In

OSOverlayView.h

rectForMapRect:

- (CGRect)rectForMapRect:(OSMapRect)mapRect

setNeedsDisplayInGridRect:

- (void)setNeedsDisplayInGridRect:(OSGridRect)gridRect