在MKMapView上的一个点周围转圈 [英] Circle around a point on an MKMapView

查看:78
本文介绍了在MKMapView上的一个点周围转圈的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在MKMapView上的任意点(不一定是用户的位置)周围绘制具有指定半径的圆.我希望外观类似于地图"应用使用的圆圈,以显示用户位置的准确性.

I need to draw a circle with a specified radius around an arbitrary point (not necessarily the user's location) on an MKMapView. I would like the appearance to be similar to the circle that the Maps app uses, to show the accuracy of the user's location.

有推荐的方法吗?还是需要创建自定义叠加层?

Is there a recommended way of doing this, or will I need to create a custom overlay?

推荐答案

您可能想看看

You might want to look at MKCircle and MKCircleView, which are part of the MapKit API and are designed for drawing circles on an MKMapView. I don't think there's an easy way to duplicate the animated "zeroing in" effect like the user location circle does, but you should be able to use these classes to show a fixed degree of accuracy around a given coordinate.

这篇关于在MKMapView上的一个点周围转圈的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆