//单指触摸返回屏幕坐标和地理坐标
- (void)viewDidLoad
{
[super viewDidLoad];
//手势识别器
UITapGestureRecognizer *tg=[[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(handlefrom:)];
//单指手势
[tg setNumberOfTapsRequired:1];
[mapView addGestureRecognizer:tg];
}
-(void) handlefrom:(UITapGestureRecognizer *)rg
{
//单指所触摸的屏幕坐标
CGPoint location=[rg locationInView:self.view];
NSLog(@"屏幕坐标::x:%f,y:%f",location.x,location.y);
//将屏幕坐标转为地理坐标
RMProjectedPoint lo=[newContents pixelToProjectedPoint:location];
NSLog(@"地理坐标::x:%f,y:%f",lo.easting,lo.northing);
}