专注收集记录技术开发学习笔记、技术难点、解决方案
网站信息搜索 >> 请输入关键词:
您当前的位置: 首页 > Iphone

地图位置点的圆圈放大效果是怎样弄上去的?该怎么处理

发布时间:2010-05-30 01:26:32 文章来源:www.iduyao.cn 采编人员:星星草
地图位置点的圆圈放大效果是怎样弄上去的?
C/C++ code

- (MKAnnotationView *)mapView:(MKMapView *)aMapView viewForAnnotation:(id <MKAnnotation>)annotation
{
    if(![annotation isKindOfClass:[MyAnnotation class]]) // Don't mess user location
        return nil;

    MKAnnotationView *annotationView = [aMapView dequeueReusableAnnotationViewWithIdentifier:@"spot"];
    if(!annotationView)
    {
        annotationView = [[MKAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:@"spot"];
        annotationView.rightCalloutAccessoryView = [UIButton buttonWithType:UIButtonTypeDetailDisclosure];
        [(UIButton *)annotationView.rightCalloutAccessoryView addTarget:self action:@selector(openSpot:) forControlEvents:UIControlEventTouchUpInside];
        annotationView.enabled = YES;
        annotationView.canShowCallout = YES;
        annotationView.centerOffset = CGPointMake(7,-15);
        annotationView.calloutOffset = CGPointMake(-8,0);
    }

    // Setup annotation view
    annotationView.image = [UIImage imageNamed:@"pinYellow.png"]; // Or whatever

    return annotationView;
}




------解决方案--------------------
http://www.cocoachina.com/bbs/read.php?tid-30567-keyword-%B7%C5%B4%F3%BE%B5.html
取坐标区域,放大这个区域,放在一个View上显示在最上层。OK了
------解决方案--------------------
楼主想说地图上有一个蓝点,有淡蓝色光圈的那个效果吗?如果是那个的话,可以在ib中将你的mkmapview控件中的shows user location勾选,或者在你定义的mkmapview对象中:你的地图对象.showsUserLocation = YES;
------解决方案--------------------
楼上正解 地图对象.showsUserLocation = YES;
------解决方案--------------------
虚拟机好像默认是显示在欧洲还是美国的某个地方,不过真机可以显示你当前的位置
友情提示:
信息收集于互联网,如果您发现错误或造成侵权,请及时通知本站更正或删除,具体联系方式见页面底部联系我们,谢谢。

其他相似内容:

热门推荐: