本文整理汇总了C#中GeoCoordinate.AsBingMapsPoint方法的典型用法代码示例。如果您正苦于以下问题:C# GeoCoordinate.AsBingMapsPoint方法的具体用法?C# GeoCoordinate.AsBingMapsPoint怎么用?C# GeoCoordinate.AsBingMapsPoint使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GeoCoordinate
的用法示例。
在下文中一共展示了GeoCoordinate.AsBingMapsPoint方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetTransitRoute
/// <summary>
/// Takes a start and end points and query for possible transit routes.
/// </summary>
/// <param name="start">Start location.</param>
/// <param name="end">End location.</param>
/// <param name="time">A time or date that relates to the route query.</param>
/// <param name="timeType">The TimeType of the dateTime parameter.</param>
public static Task<BingMapsQueryResult> GetTransitRoute(GeoCoordinate start, GeoCoordinate end, DateTime time, TimeType timeType)
{
string rqp = new TransitQueryParameters(start.AsBingMapsPoint(), end.AsBingMapsPoint(), time, timeType)
{
MaxSolutions = 5,
RoutePathOutput = RoutePathOutput.Points
}.ToString();
var queryUri = ConstructQueryUri("Routes/Transit", rqp);
return ExecuteQuery(queryUri);
}
示例2: GetWalkingRoute
/// <summary>
/// Takes a start and end points and query for possible walking routes.
/// </summary>
/// <param name="start">Start location.</param>
/// <param name="end">End location.</param>
public static Task<BingMapsQueryResult> GetWalkingRoute(GeoCoordinate start, GeoCoordinate end)
{
var queryUri = ConstructQueryUri(
"Routes/Walking",
new RouteQueryParameters(start.AsBingMapsPoint(), end.AsBingMapsPoint()) { RoutePathOutput = RoutePathOutput.Points, Tolerances = new List<double> { 0.0000005 } }.ToString());
return ExecuteQuery(queryUri);
}
示例3: GetLocationInfo
/// <summary>
/// Takes a latitude/longitude location and query for the information related to this location.
/// </summary>
/// <param name="point">Location on map.</param>
public static Task<BingMapsQueryResult> GetLocationInfo(GeoCoordinate point)
{
var queryUri = ConstructQueryUri(
"Locations/" + point.AsBingMapsPoint(), null);
return ExecuteQuery(queryUri);
}