【发布时间】:2013-02-25 12:05:03
【问题描述】:
如何使用适用于 iOS 的 google maps sdk 获取 CGPoint 位置? 我需要在用户位置上添加 pinview。
【问题讨论】:
如何使用适用于 iOS 的 google maps sdk 获取 CGPoint 位置? 我需要在用户位置上添加 pinview。
【问题讨论】:
与this question基本相反,例如:
GMSMapView* mapView = ...;
CLLocationCoordinate2D coordinate = ...;
...
CGPoint point = [mapView.projection pointForCoordinate: coordinate];
【讨论】:
好的,根据您的问题,您是否要将用户位置转换为 cgpoint,是吗? 尝试使用这个。
CGPoint newCenter = [self.map convertCoordinate:coord toPointToView:self.map];
问候。
【讨论】: