2013-10-07 39 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

相關問題