关于MKMapView

时间:2009-07-29 09:38:38

标签: iphone google-maps

我正在开发iPhone应用程序

我的要求是,

当我打开我的应用程序时,它必须打开一个地球仪,我们可以通过触摸来旋转地球。我们必须指向重要的城市,如地图。当我们点击图钉时,我们必须放大并显示城市更近。

是否可以通过使用MKMapView来实现。请帮助我。

2 个答案:

答案 0 :(得分:2)

MKMapView不会以3D形式显示地图,这就像您想要的旋转地球一样。

就识别点和放大位置而言,两者都非常适用于MKMapView,尽管是2D。

答案 1 :(得分:0)

我找到的最好的工作是创建一个自定义的AnnotationView。在AnnotationView内创建一个 - (void)BeginTouch方法。在这里添加自定义方法...例如,我在下面调用了NotificationCenter。

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { 

UITouch* aTouch = [touches anyObject]; 
startLocation = [aTouch locationInView:[self superview]]; 
originalCenter = self.center; 
[[NSNotificationCenter defaultCenter] postNotificationName:@"mapNoteSelected" object:self userInfo:nil];
[super touchesBegan:touches withEvent:event]; } 

希望有所帮助!