Mapkit 没有在设备上显示默认的蓝色斑点?

发布于 2024-08-10 00:39:53 字数 225 浏览 3 评论 0原文

我在我的应用程序中使用mapkit。我想在mapview中显示蓝色斑点。我已经设置了[mapview setShowUserLocation:YES];但它没有显示蓝色斑点。它的坐标也是-180.0000,-180.0000?这是怎么发生的? Mapkit 中是否存在错误?我没有使用位置管理器来显示蓝点。我知道将 showuserlocation 设置为 yes 会自动显示蓝点。有人知道为什么蓝色斑点具有负坐标以及如何解决此问题吗?

I am using mapkit in my application.i want to show blue blob in mapview.i have set [mapview setShowUserLocation:YES]; but it doesn't showing blue blob.also it's cordinates are -180.0000,-180.0000? how is this happen? is there a bug in mapkit. i am not using location manager to show blue dot.i know that setting showuserlocation to yes will show the blue dot automatically.does someone know why blue blob having negative cordinates and how to solve this problem?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

凉栀 2024-08-17 00:39:53

蓝色斑点不是默认的,它是专门用于 Google 地图应用程序的。如果您希望注释在地图上显示某些内容,则需要为其提供 MKAnnotationView。 MapKit 免费附带 MKPinAnnotationView,您可以在其中选择红色、绿色或紫色图钉。如果您希望显示其他内容,则必须提供您自己的自定义视图和您自己的自定义艺术。

The blue blob isn't default, it's specifically for the Google Maps application. If you want your annotation to show something on the map, you need to provide an MKAnnotationView for it. MapKit comes with the MKPinAnnotationView for free, where you can select a red, green or purple pin. If you want anything else to appear, you will have to provide your own custom view and your own custom art.

爺獨霸怡葒院 2024-08-17 00:39:53
if (annotation == aMapView.userLocation) 
{
    return nil; // this might be the moment the location was first detected
}
if (annotation == aMapView.userLocation) 
{
    return nil; // this might be the moment the location was first detected
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文