格式

let coordinatesStrReg = /((-*[1][0-9]{0,2}|0)(\.[0-9]{1,6})*),\s{0,2}((-*[1-9][0-9]{0,1}|0)(\.[0-9]{1,6})*)/gstr.replace(coordinatesStrReg, (str, $1, $2, $3, $4, $5) => {  // lat=$1 lng lat=$4  console.log($1, $4)})

代码,https://www.npmjs.com/package/coordtransform2

本站文章《gis经纬度坐标转换多格式兼容:支持字符串/数组/GeoJSON》,
请注明出处:https://www.zhoulujun.cn/html/GIS/WebGIS/8227.html