Home >Web Front-end >JS Tutorial >js code to obtain the site coordinates of bus lines through Baidu Map_javascript skills

js code to obtain the site coordinates of bus lines through Baidu Map_javascript skills

WBOY
WBOYOriginal
2016-05-16 17:53:501228browse

Recently, I was doing simulation data for Baidu Maps. I needed to obtain the coordinate information of the stations along a certain bus line. It seems that Baidu does not have a ready-made API, so I made a simulation page. It is just a tool. IE6/7/8 does not support it

Copy code The code is as follows:



< head>

Get bus stop coordinates





If you want to get the reverse line, put var stations = result['0']._stations; changed to var stations = result[xx]._stations; tidied up:
Copy code The code is as follows:





获取公交站点坐标











来自小西山子
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn