Xamarin.ios CLLocation没有坐标属性

Xamarin.ios CLLocation没有坐标属性,xamarin.ios,xamarin,cllocation,Xamarin.ios,Xamarin,Cllocation,我只是第一次通过定位服务工作,一切似乎都在工作,因为它正确地找到了我的位置,但我在提取坐标时遇到了困难 文档声明CLLocation有一个“Coordinates”属性,编译器对这段代码感到满意。但是在运行时,CLLocation只返回字符串描述 我启动位置管理器 _locationManager = new CLLocationManager (); _locationManager.DesiredAccuracy = 1000; // handle the upd

我只是第一次通过定位服务工作,一切似乎都在工作,因为它正确地找到了我的位置,但我在提取坐标时遇到了困难

文档声明CLLocation有一个“Coordinates”属性,编译器对这段代码感到满意。但是在运行时,CLLocation只返回字符串描述

我启动位置管理器

    _locationManager = new CLLocationManager ();
    _locationManager.DesiredAccuracy = 1000; 

    // handle the updated location method and update the UI
    _locationManager.LocationsUpdated += (object sender, CLLocationsUpdatedEventArgs e) => {
            UpdateLocation (e.Locations [e.Locations.Length - 1], _destinationLatitude, _destinationLongitude);
        };

    if (CLLocationManager.LocationServicesEnabled)
        _locationManager.StartUpdatingLocation ();
事件将正确触发

    static public void UpdateLocation (CLLocation current, Double destinationLat, Double destinationLng)
    {
        //Make the start pairing
        string start = current.Coordinate.Latitude.ToString() + "," + current.Coordinate.Longitude.ToString();

        //Make the destination pairing
        string destination = destinationLat.ToString() + "," + destinationLng.ToString();
    }
然而,应用程序只是崩溃了。在断点上捕获它,我看到以下内容,它似乎只有一个包含的description属性

Description "<+50.58198902,-3.67661728> +/- 65.00m (speed -1.00 mps / course -1.00) @ 25/07/2013 13:11:28 British…" string
Description“+/-65.00m(速度-1.00mps/航程-1.00)@25/07/2013 13:11:28英国…”字符串
显然,我可以从这个文本字段中提取lat/lng,但我觉得我不需要这样做。谢谢你的帮助


我将完全相同的代码移到了另一个控制器中,效果很好。两个控制器之间的唯一区别是,出现故障的控制器使用monotouch对话框反射api绑定屏幕元素。我不明白为什么这会有任何区别,但这是两个控制器之间唯一的区别。现在一切正常,如果有时间,我将尝试在较小的样本中复制。

您能运行LocationManager样本应用程序吗?谢谢。岩芯位置示例工作正常。它会给我一些可以比较的东西。