OSM Viewer
Aspose.GIS for .NETライブラリを使用して、OSMビューアを実装します。
ライブサンプル
Aspose.GIS for .NET / C#では、“OSM Viewer”アプリケーションをオンラインで無料で提供しており、その機能と品質を調査できます。
コードサンプル - OSM Viewer
以下のコードスニペットは、OSMビューアの実装方法を示しています。下記のコードは、OSMレイヤーを使用して画像マップを作成します。マップに空間参照システムを指定すると、ロードされたすべてのレイヤーがそれに変換されます。 このサンプルでは、指定されたスタイルを使用して線を描画します。ライブラリには、点、線、および面のスタイルもあります。
// For complete examples and data files, please go to https://github.com/aspose-gis/Aspose.GIS-for-.NET | |
// Create a map | |
using (var map = new Map(800, 400)) | |
{ | |
// Use the specified SRS | |
map.SpatialReferenceSystem = SpatialReferenceSystem.Wgs84; | |
// Use the specified style to draw lines | |
// We also have styles for points, lines, and surfaces. | |
var symbolizer = new SimpleLine() {Width = Measurement.Pixels(2)}; | |
// Open a layer and add to the map | |
map.Add(VectorLayer.Open("land.osm", Drivers.OsmXml), symbolizer); | |
// Render the map | |
map.Render("land_out.png", Renderers.Png); | |
} |
このサンプルは一般的な可能性を示しています。Aspose.GIS for .NETには、マップのレンダリングのための幅広い機能があります。
プラットフォーム - .NET / C#
WindowsではFramework 4.7以降を、WindowsまたはLinuxでは.NET Core 2.0以降をサポートしています。