小编vis*_*hnu的帖子

难以在谷歌地图上获得X和Y标记的位置?

let camera = GMSCameraPosition.camera(withLatitude: 36.80, longitude: 10.18, zoom: 2.0)
let mapView = GMSMapView.map(withFrame: CGRect.zero, camera: camera)
mapView.delegate = self
view = mapView

// Creates a marker in the center of the map.
let marker = GMSMarker()
marker.position = CLLocationCoordinate2D(latitude: 36.80, longitude: 10.18)
marker.title = "Tunis"
marker.snippet = "Tunisia"
marker.map = mapView
let position = CLLocationCoordinate2D(latitude: 51.5, longitude: -0.127)
let london = GMSMarker(position: position)
london.title = "London"
london.map = mapView
Run Code Online (Sandbox Code Playgroud)

这是我的标志和点击它didtapMarker委托方法被调用在我想x,y标志物的价值,以创建其中指出关于特定标记的一些信息视图.我怎样才能做到这一点?

google-maps google-maps-markers ios swift

0
推荐指数
1
解决办法
195
查看次数

标签 统计

google-maps ×1

google-maps-markers ×1

ios ×1

swift ×1