Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
470 views
in Technique[技术] by (71.8m points)

不懂就问,js数据格式转换,将每个变量里的单词首字母大写

今天我同事给我分享了一份前端的面试题
image.png

需要将上面这幅图的数据转换成下面图的格式
image.png
请问下这个标红部分的实现思路有哪些呀??


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

我觉得是你理解错题意了,这里其实问的是 geom 数据结构的转换,也就是把上面的坐标系表达方式转换成下面那个。而 POINT => point ,LINESTRING => LineString 基本写死或者用 Map 就行了,不是这题的考点。


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...