如何获得iPhone地图应用蓝点与当前位置浅蓝色场? [英] How to get iPhone Maps app blue dot with light blue field for current location?
本文介绍了如何获得iPhone地图应用蓝点与当前位置浅蓝色场?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我觉得冠军是相当自我exlanatory。目前,当我添加一个默认的注释为当前的位置:
I think the title is quite self exlanatory. Currently when I add a default annotation for current location:
let currentAnnot = MKPointAnnotation()
currentAnnot.coordinate = loc.coordinate
mainMap.addAnnotation(currentAnnot)
这是给我一个红色的脚。我想与苹果iPhone地图应用程序在默认情况下使用淡蓝色场相同的蓝色圆点。是否有一个特别的名字,我怎么能增加吗?
It is giving me a red pin. I want the same blue dot with light blue field which the Apple iPhone Maps app is using by default. Is there a special name for that and how can I add it?
推荐答案
这是因为你要添加的注释(PIN),而不是用户的位置。
It's because you're adding an annotation (pin) rather than the user location.
通过启用了以下
mapView.showsUserLocation = true
<一个href=\"https://www.veasoftware.com/tutorials/2015/7/25/map-view-current-location-in-swift-x$c$c-7-ios-9-tutorial\"相对=nofollow>还检查了一个教程,可以帮助
这篇关于如何获得iPhone地图应用蓝点与当前位置浅蓝色场?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文