1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
| /**
| * 字符串坐标转数组坐标
| * @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 []
| }
| }
|
|