ScreenProjection.h
1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
//
// ScreenProjection.h
// Images
//
// Created by Joseph Gentle on 28/08/08.
// Copyright 2008 __MyCompanyName__. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "Mercator.h"
#import <CoreLocation/CoreLocation.h>
@interface ScreenProjection : NSObject {
MercatorPoint topLeft;
// Bounds of the screen in pixels
CGRect bounds;
// Scale is how many meters in 1 pixel. Larger scale means bigger things are smaller on the screen.
// Scale of 1 means 1 pixel == 1 meter.
// Scale of 10 means 1 pixel == 10 meters.
float scale;
}
-(id) initWithBounds: (CGRect) bounds;
-(void) moveToMercator: (MercatorPoint) point;
-(void) moveToLatLong: (CLLocationCoordinate2D) point;
- (void)moveBy: (CGSize) delta;
// Center given in screen coordinates.
- (void)zoomByFactor: (float) factor Near:(CGPoint) center;
- (void)zoomBy: (float) factor;
-(CGPoint) projectMercatorPoint: (MercatorPoint) point;
-(CGRect) projectMercatorRect: (MercatorRect) rect;
-(MercatorPoint) projectInversePoint: (CGPoint) point;
-(MercatorRect) projectInverseRect: (CGRect) rect;
-(MercatorRect) mercatorBounds;
-(CGRect) screenBounds;
@property (assign, readwrite) float scale;
@property (readonly) MercatorPoint topLeft;
//@property (assign, readwrite) CGSize viewSize;
@end