MapPolyLine 内に何かがあるかどうかを判断するために、MapPolyLine の周りにバッファを作成しようとしています。以下は、MapPolyLine のコードです。
private void routeService_CalculateRouteCompleted(object sender, CalculateRouteCompletedEventArgs e)
{
// If the route calculate was a success and contains a route, then draw the route on the map.
if ((e.Result.ResponseSummary.StatusCode == BingMapRouteService.ResponseStatusCode.Success) & (e.Result.Result.Legs.Count != 0))
{
// Set properties of the route line you want to draw.
System.Windows.Media.Color routeColor = Colors.Blue;
SolidColorBrush routeBrush = new SolidColorBrush(routeColor);
//MapPolyline routeLine = new MapPolyline();
App.routeLine.Locations = new LocationCollection();
App.routeLine.Stroke = routeBrush;
App.routeLine.Opacity = 0.65;
App.routeLine.StrokeThickness = 5.0;
// Retrieve the route points that define the shape of the route.
foreach (Location p in e.Result.Result.RoutePath.Points)
{
App.routeLine.Locations.Add(new GeoCoordinate(p.Latitude, p.Longitude));
}
MapPolyLine のバッファーの座標を取得するにはどうすればよいですか (ARCGIS 拡張なしで Bing Map API のみを使用)。