ビジュアルスタジオ2015 C#を使用して、Webチュートリアルからポリラインソリューションを作成しました。ビジュアルスタジオでキュービック補間を実装する方法
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Microsoft.Maps.MapControl.WPF;
using Microsoft.Maps.MapControl.WPF.Design;
namespace WPFTestApplication
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
MapPolyline polyline = new MapPolyline();
polyline.Stroke = new System.Windows.Media.SolidColorBrush(System.Windows.Media.Colors.Blue);
polyline.StrokeThickness = 5;
polyline.Opacity = 0.7;
polygon.Locations = new LocationCollection() {
new Location(47.6424,-122.3219),
new Location(47.8424,-122.1747),
new Location(47.5814,-122.1747)
};
myMap.Children.Add(polyline);
}
}
}
出力ディスプレイを次のように:
経度、緯度ポイントを次のように
<Window x:Class="WPFTestApplication.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:m="clr-namespace:Microsoft.Maps.MapControl.WPF;assembly=Microsoft.Maps.MapControl.WPF"
Width="1024" Height="768">
<Grid x:Name="LayoutRoot" Background="White">
<m:Map x:Name="myMap" CredentialsProvider="Insert_Your_Bing_Maps_Key" Center="47.740,-122.125" ZoomLevel="11">
<m:MapPolyline Stroke="Blue" StrokeThickness="5"
Locations="47.6424,-122.3219 47.8424,-122.1747 47.5814,-122.1747 47.67856,-122.130994"
Opacity="0.7"/>
</m:Map>
</Grid>
</Window>
xaml.csファイルは次のようhttps://msdn.microsoft.com/en-us/library/hh868034.aspx
XAMLファイルでありますマップ上のポリラインで接続されます。ポリラインは直線です。
キュービック/スプライン補間を使用して、経度、緯度点を接続して滑らかな曲線を作成することができます。このコードで立方体/スプライン補間を実装することは可能ですか?組み込み関数はありますか?
ありがとうございました。