ste*_*eaw 5 google-maps uiimageview ios swift
这是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
}
}
Run Code Online (Sandbox Code Playgroud)

所有这些红色圆圈都是一个UIImageView,位于MapView内部。我希望当前位置在此UIImageView之上...但是使用mapView.myLocationEnabled = true的只是布尔属性,而不是视图或标记...或其他任何东西。.我是否想做些什么?任何帮助都会很棒...谢谢。

| 归档时间: |
|
| 查看次数: |
846 次 |
| 最近记录: |