本文整理汇总了C#中Location.ToDms方法的典型用法代码示例。如果您正苦于以下问题:C# Location.ToDms方法的具体用法?C# Location.ToDms怎么用?C# Location.ToDms使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Location
的用法示例。
在下文中一共展示了Location.ToDms方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: clicked
public void clicked(NSNumber lat, NSNumber lng)
{
var location = new Location(lat.DoubleValue, lng.DoubleValue);
var message = string.Format("Looking up {0}...", location.ToDms()).Replace("\"", "\\\"");
MapWebView.InvokeMapScript("setPopup([{0}, {1}], \"{2}\")", lat, lng, message);
MapController.NameFromLocation(
location,
Location.PlaceNameFilter.Minimal,
(s) =>
{
BeginInvokeOnMainThread(delegate
{
MapWebView.InvokeMapScript("setPopup([{0}, {1}], \"{2}\")", lat, lng, s);
});
});
}
示例2: UpdateLocation
public void UpdateLocation(Location newLocation)
{
Location = newLocation;
_gpsCoordinates = Location == null ? "" : Location.ToDms();
}
示例3: UpdateFileLocations
private void UpdateFileLocations(IList<string> pathList, double latitude, double longitude, bool updateStatusText = true)
{
if (pathList.Count < 1)
return;
var location = new Location(latitude, longitude);
if (updateStatusText)
SetStatusText("Updating {0} file(s) to {1}", pathList.Count, location.ToDms());
var imagePathList = new List<string>();
var videoPathList = new List<string>();
SeparateVideoList(pathList, imagePathList, videoPathList);
Task.Run( () => GeoUpdater.UpdateFiles(
imagePathList,
videoPathList,
latitude,
longitude,
() => BeginInvokeOnMainThread( delegate
{
foreach (var f in pathList)
{
var imageItem = ImageItemFromPath(f);
if (imageItem != null)
{
imageItem.UpdateLocation(location);
}
}
if (updateStatusText)
{
SetStatusText("Finished updating {0} files to {1}", pathList.Count, location.ToDms());
}
imageView.ReloadData();
})));
}