Authored by Joseph G

Removed current double-touch behaviour. How should we handle this?

Also added geographic survey projection as per request.
... ... @@ -212,7 +212,7 @@
//Double-tap detection (currently used for debugging pixelToLatLng() method)
if (touch.tapCount == 2)
{
NSLog(@"***************************************************");
/* NSLog(@"***************************************************");
NSLog(@"Begin double-tap pixel/LatLng translation debug test");
CGPoint pixel = [touch locationInView:self];
NSLog(@"Double-tap detected at: x=%f, y=%f", pixel.x, pixel.y);
... ... @@ -230,6 +230,12 @@
NSLog(@"Converted LatLng to Pixel says we tapped at: x=%f, y=%f", screenPoint.x, screenPoint.y);
NSLog(@"***************************************************");
*/
// For consistancy with the built-in map app, I want to do something like this:
// [contents zoomInToNextNativeZoom];
}
//***************************************************************************************
... ...
... ... @@ -21,6 +21,8 @@
+ (RMProjection *) googleProjection;
+ (RMProjection *) EPSGLatLong;
+ (RMProjection *) OSGB;
- (id) initWithString: (NSString*)params;
... ...
... ... @@ -84,6 +84,7 @@ NS_INLINE RMLatLong RMPixelPointAsLatLong(RMXYPoint xypoint) {
static RMProjection* _google = nil;
static RMProjection* _latlong = nil;
static RMProjection* _osgb = nil;
+ (RMProjection*)googleProjection
{
... ... @@ -98,7 +99,7 @@ static RMProjection* _latlong = nil;
}
}
+ (RMProjection*)EPSGLatLong;
+ (RMProjection*)EPSGLatLong
{
if (_latlong)
{
... ... @@ -111,4 +112,20 @@ static RMProjection* _latlong = nil;
}
}
+(RMProjection*) OSGB
{
if (_osgb)
{
return _osgb;
}
else
{// OSGB36 and tmerc
_osgb = [[RMProjection alloc] initWithString:@"+proj=tmerc
+lat_0=49 +lon_0=-2 +k=0.999601 +x_0=400000 +y_0=-100000 +ellps=airy
+datum=OSGB36 +units=m +no_defs"];
return _osgb;
}
}
@end
... ...