使用jQuery,我有一串坐标字符串,如下所示:
38.313072,-89.863845,38.312675,-89.863586,38.310405,-89.862091,38.310405,-89.862091,38.309913,-89.861976,38.309768,-89.861976,38.309768,-89.861976
我需要它们看起来像这样:
[38.313072, -89.863845] [38.312675, -89.863586] [38.310405, -89.862091] [38.310405,-89.862091] [38.309913, -89.861976] [38.309768, -89.861976] [38.309768, -89.861976] [38.30965, -89.861991]
我需要想办法将每隔一个逗号用空格和括号替换成坐标集。
有什么好的建议吗?