openlayers - 格式 GPX.writeFeatures 不写入特征节点
问题描述
我正在尝试使用 ol/format/GPX.writeFeatures() 从 LineString 功能生成 gpx,但仅获取 gpx 标头:
<gpx xmlns="http://www.topografix.com/GPX/1/1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd" version="1.1" creator="OpenLayers"/>
没有特征的节点。
作为测试,我添加了:
let gpx = new GPX();
console.log(features[0]);
console.log(gpx.writeFeatures(features[0]));
到 displayFeatureInfo 函数中的GPX 数据示例index.js。
我错过了什么吗?
解决方案
推荐阅读
- qt - 改变持有QDockWidgets的QTabBar的位置?
- azure - 将值从 Azure 逻辑应用程序传递到 HttpTrigger Azure 函数
- sql - 如何根据匹配的 ID 更新列
- ios - “用户被阻止直播。” (域=com.google.GTLRErrorObjectDomain 代码=403)
- c# - 从数据库获取结果时防止循环引用
- amazon-web-services - 如何在无服务器框架的“serverless.yml”文件中获取 URL 端点详细信息作为变量?
- perl - 用 Perl 读取 CSV 会产生扭曲的线条
- c++ - 无法在电子中获取 displayName
- python - 如何正确初始化 PDB.DSSP 对象
- html - 如何使用 Chart.js 和 Angular 框架在 html 画布中正确显示图表