KML 到 SVG 转换器
使用 Aspose.GIS for .NET 库实现 KML 到 SVG 转换器。
在线示例
Aspose.GIS for .NET / C# 在线免费提供 “KML 到 SVG 转换器” 应用程序,您可以在其中调查其功能和质量如何运作。
代码示例 - KML 到 SVG 转换器
以下代码片段向您展示了如何实现 KML 到 SVG 转换器。下面的代码使用 KML 层创建图像地图。然后我们将地图保存为 SVG 格式。如果您为地图指定空间参考系统,所有加载的图层都将转换为它。 该示例使用指定的样式绘制线条。该库还具有用于点、线和面的样式。
// 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.kml", Drivers.Kml), symbolizer); | |
// Render the map to Svg format | |
map.Render("land_out.png", Renderers.Svg); | |
} |
此示例显示了常规的可能性。Aspose.GIS for .NET 具有广泛的功能来渲染地图。
平台 - .NET / C#
我们支持 Windows 下的 Framework 4.7 或更高版本,以及 Windows 或 Linux 下的 .NET Core 2.0 或更高版本