/** * 字符串坐标转数组坐标 * @param geometryString */ export function convertStringToList(geometryString){ if (geometryString){ let finalString = geometryString.replaceAll(",",";").replaceAll(" ",",") let list = finalString.split(";") let finalList = [] list.forEach(e=>{ let tempList = e.split(",") let tempList1 = [] tempList.forEach(k=>{ tempList1.push(k-0) }) tempList1.push(0) finalList.push(tempList1) }) return finalList }else { return [] } }