SharpMapボックスにシェープファイルを表示したいので.shp
、次のコードを書きました:
public partial class Details : UserControl { public Details() { InitializeComponent(); SharpMap.Layers.VectorLayer vlay = new SharpMap.Layers.VectorLayer("States"); string path = @"D:\Studies\file.shp"; SharpMap.Map myMap = new SharpMap.Map(new System.Drawing.Size(500, 250)); vlay=new SharpMap.Data.Providers.ShapeFile(path); MapBox.Map.Layers.Add(vlay); MapBox.Map.ZoomToExtents(); } }
それは実行されず、次のように表示されます:
SharpMap.Data.Providers.ShapeFile
に変換できますSharpMap.Layers.VectorLayer
私は何をすべきか ?