你正在訪問的內容是外部程式的映像位址,僅用於使用者加速訪問,本站無法保證其可靠性。當前的連結位址(單點即可複製)為 https://greasyfork.org.cn/zh-CN/scripts/524747-geokmler,源站連結 點此以跳轉。
geoKMLer is a JavaScript library designed to convert KML data into GeoJSON format efficiently. It supports conversion of Placemarks containing Point, LineString, Polygon, and MultiGeometry elements.
当前为
此脚本不应直接安装。它是供其他脚本使用的外部库,要使用该库请加入元指令 // @require https://update.greasyfork.org.cn/scripts/524747/1526225/GeoKMLer.js
GeoKMLer is a JavaScript library designed to convert KML data into GeoJSON format efficiently. It supports the conversion of various KML geometries and extended data, making it ideal for integrating KML spatial data into web mapping applications.
This project is free software licensed under the GNU General Public License v3.0. See the LICENSE file for more details.
GeoKMLer provides a straightforward API to parse KML files and convert them into a GeoJSON FeatureCollection. It is suitable for use in geographic data visualization and web mapping applications.
<ExtendedData> elements into GeoJSON properties.To use GeoKMLer, create an instance of GeoKMLer and use its methods to perform conversions from KML strings to GeoJSON objects.
var geoKMLer = new GeoKMLer(); // Create a new instance of GeoKMLer
// Sample KML data input
const kmlData = `...KML data string...`;
// Parse the KML data
const xmlDoc = geoKMLer.read(kmlData);
// Convert to GeoJSON
const geoJson = geoKMLer.toGeoJSON(xmlDoc);
console.log(geoJson);
The structure and logic for this project are based on established methods for XML to GeoJSON conversion, leveraging modern JavaScript best practices.