ios - 如何获取 Google Maps API iOS 中某个点的坐标?

标签 ios api google-maps xamarin.ios xamarin

我如何在适用于 iOS 的 Google map API Xamarin 中获取 PointF 的坐标 (CLLocationCoordinate2D)

以前使用过:

PointF location = reticula.Center;                  
CLLocationCoordinate2D coordinate = MapaApple.ConvertPoint (location, this.View);

CLLocationCoordinate2D 我确实返回了,但现在使用了 google API

我用的是这样的:

PointF location = reticula.Center;
CLLocationCoordinate2D coordinate = new CLLocationCoordinate2D (MapaGoogle.ConvertPointFromView(CLLocation,this.View);

但是有一点我回来了。

我需要 CLLocationCoordinate2D 有什么想法吗?

最佳答案

你可以使用这样的东西:

CLLocationCoordinate2D coordinate = mapView.Projection.CoordinateForPoint(location);

注意:该点应相对于 map View 。

关于ios - 如何获取 Google Maps API iOS 中某个点的坐标?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19226726/

相关文章:

google-maps - 在 Google Places Autocomplete 中需要多个国家/地区组件限制

iphone - 在 IOS 中通过 HTTP 流式传输视频

ios - 使用非公共(public) API LSApplicationWorkspace 拒绝应用程序

Angular、Google map 、如何从 map 获取标记列表并在其上使用 onClick 事件?

ruby - 使用调用第三方库的 API 包装器时如何编写正确的测试?

Android 10 : IMEI no longer available on API 29. 寻找替代品

javascript - 如何在菲律宾风格 map 中隐藏标签?

ios - 如何使特定物体抵抗重力? (SpriteKit/objective-C )

ios - '保存时发现循环依赖。'尝试保存指向现有解析对象的指针时

ios - Swift如何访问嵌套结构中的信息?