2013-10-07 35 views
1

我怎样才能获得在谷歌地图API Xamarin一组PointF的坐标(CLLocationCoordinate2D)适用于iOS如何在Google Maps API iOS中获取点的坐标?

以前使用

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

CLLocationCoordinate2D我真的回来了,但现在谷歌API

我使用像这样的东西:

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

但是一个PointF我回来。

我需要CLLocationCoordinate2D有什么想法吗?

回答

1

你可以使用这样的事情:

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

注:点应该是相对于地图视图。

+0

谢谢。 我在我的代码中试过了,它效果很好。 – Maico2007

相关问题