点击触摸缩放mapView

vij*_*ari 8 iphone mapkit ios4 ios

我正试图抓住触摸事件的坐标.我可以抓住,但是当给变焦有大数字时,我把它放在一个函数中

newCoord = [mapView convertPoint:location toCoordinateFromView:mapView],
Run Code Online (Sandbox Code Playgroud)

我的坐标错了.我能做什么?

我的代码:

UITouch *touch = [touches anyObject];

CGPoint location = [touch locationInView:touch.view];


NSLog(@"locationTOUCH:%f,%f", location.x,location.y);

CLLocationCoordinate2D newCoord;

newCoord = [mapView convertPoint:location toCoordinateFromView:mapView];

NSLog(@"coordinate-%f,%f", newCoord.latitude,newCoord.longitude); 
Run Code Online (Sandbox Code Playgroud)

Ort*_*ntz 1

我想应该通过改变来解决

CGPoint location = [touch locationInView:touch.view];
Run Code Online (Sandbox Code Playgroud)

CGPoint location = [touch locationInView:mapView];
Run Code Online (Sandbox Code Playgroud)