这是GMSMapView内部的UIImageView示例。我的问题是Google的蓝点显示在UIImageView后面......我怎样才能让myLocationEnabled
的蓝点始终显示在顶部?
@IBOutlet weak var mapView: GMSMapView!
func locationManager(manager: CLLocationManager!, didChangeAuthorizationStatus status: CLAuthorizationStatus){
NSLog("Did Change Authorization Status")
if status == CLAuthorizationStatus.AuthorizedWhenInUse {
//This uses the location manager
if locationManager.location != nil {
currentLatitude = locationManager.location.coordinate.latitude
currentLongitude = locationManager.location.coordinate.longitude
}
//How do I get this over my UIImageView?
mapView.myLocationEnabled = true
var TARGET: CLLocationCoordinate2D = CLLocationCoordinate2D(latitude: currentLatitude, longitude: currentLongitude)
var camera: GMSCameraPosition = GMSCameraPosition(target: TARGET, zoom: 12, bearing: 0, viewingAngle: 0)
mapView.camera = camera
}
}
所有这些红色圆圈都是One UIImageView,它位于MapView内部。我希望当前位置位于此UIImageView的顶部...但是使用mapView.myLocationEnabled = true
只是布尔属性而不是视图或标记......或者其他任何东西......我正在尝试做什么可能?任何帮助都会很棒......谢谢。