私は学生で、実際にMonodevelopでライブラリOsmsharpを使用する方法を研究しています。Android用OsmsharpとMono
私はテストのために次のコードを使用: 保護オーバーライドボイドOnCreate関数(バンドルのバンドル) {base.OnCreate(バンドル)。
// Set our view from the "main" layout resource
SetContentView (Resource.Layout.Main);
// create a router from an osm file.
Router router = Router.CreateFrom(new FileInfo("demo.osm"));
// instantiate route end coordinates.
GeoCoordinate location_from = new GeoCoordinate(51.26565,4.7777);
GeoCoordinate location_to = new GeoCoordinate(51.2741,4.79795);
// resolve the end points and link them to the road network.
ResolvedPoint from = router.Resolve(location_from);
ResolvedPoint to = router.Resolve(location_to);
// calculate the route.
OsmSharpRoute route = router.Calculate(from, to);
// save the route as a GPX file.
route.SaveAsGpx(new FileInfo("demo.gpx"));
}
(このコードは、ライブラリOsmsharpためのチュートリアルからのコードです)
私の問題は、私はプロジェクトをビルドするとき、私はこのエラーを持っている:
System.IO.FileNotFoundException :アセンブリ 'System.Drawing、Version = 4.0.0.0、> Culture = neutral、PublicKeyToken = b03f5f7f11d50a3a'を読み込めませんでした。おそらく、AndroidプロファイルのMonoには存在しないでしょうか?
ファイル名:ファイル 'System.Drawing.dll' と 'OpenTK.dll' から 'System.Drawing.dll'
いくつかの研究の後、私が追加した参照。私はまた、ファイルの冒頭に "using"を追加しましたが、私は以前と同じエラーがあり、なぜそれが分からないのですか?
Androidプロジェクト用のMonoでOsmsharpライブラリを使用できるかどうかを知りたいですか?
あなたの答えをありがとう、私は別の方法で検索します – lenul79