【发布时间】:2014-07-29 12:52:31
【问题描述】:
我想在 xamarin 中获取用户当前的 ios 经纬度。
我看过其他帖子,据我了解。
就像:
CLLocationManager lm = new CLLocationManager();
... (Acurray)
... (Other Specs)
lm.StartUpdatingLocation();
lm.Location.Coordinate.Latitude.ToString();
lm.Location.Coordinate.Longitude.ToString();
但是,当我在模拟器中运行它时,它什么也没做。它不会要求我打开我的位置服务或用纬度和经度更新我的标签。
另外,我如何检查定位服务是否已打开以及是否未打开。如何让用户去做。 (例如某些应用程序上的弹出窗口要求您打开 GPS)
【问题讨论】:
标签: c# ios xamarin cllocationmanager