friend 们您好,我需要将我在项目中使用 openlayers 收到的坐标转换为 wkt,如果您能帮助我,我将不胜感激。
我收到的坐标信息:
(2) [32.834075024001905, 39.978537003695095]
最佳答案
看看https://openlayers.org/en/latest/apidoc/module-ol_format_WKT.html
您的解决方案可能如下所示
var format = new ol.format.WKT(),
wkt = format.writeGeometry(yourFeature.getGeometry());
关于javascript - 坐标到 wkt OpenLayers,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69794316/