[英]android search nearby bus stop google api
I have android project for searching nearby bus stops i have this url: http://travelplanner.mobiliteit.lu/hafas/query.exe/dot?performLocating=2&tpl=stop2csv&stationProxy=yes&look_maxdist=250&look_x=6112550&look_y=49610700 我有一个用于搜索附近公交车站的android项目,我有以下网址: http : //travelplanner.mobiliteit.lu/hafas/query.exe/dot?performLocating=2&tpl= stop2csv& stationProxy= yes& look_maxdist= 250& look_x= 6112550& look_y=49610700
i write in the code 我写代码
StringBuilder sb = newStringBuilder("http://travelplanner.mobiliteit.lu/hafas/query.exe/dot?performLocating=2&tpl=stop2csv&stationProxy=yes &");
sb.append("look_maxdist=250");sb.append("look_x="+mLatitude");sb.append("look_y="+mLongitude");
where mLatitude and mLongitude are for current user location 其中,mLatitude和mLongitude用于当前用户位置
now the response in not json but http response 现在响应不是json而是http响应
6,113204;49,610280;200403005;Belair, Sacré-Coeur;http://travelplanner.mobiliteit.lu/hafas/stboard.exe/dn?L=vs_stb&input=200403005&start
6,112260;49,612644;200403002;Belair, Archiducs;http://travelplanner.mobiliteit.lu/hafas/stboard.exe/dn?L=vs_stb&input=200403002&start
or as link maybe 或作为链接
id=A=1@O=Belair, Sacré-Coeur@X=6,113204@Y=49,610280@U=82@L=200403005@B=1@p=1481807866;
id=A=1@O=Belair, Archiducs@X=6,112260@Y=49,612644@U=82@L=200403002@B=1@p=1481807866;
the question is how i can continue with this result to ge coordinates (6,113204,49,610280)and put marker on the map here is the link https://data.public.lu/en/datasets/arrets-de-transport-public-et-departs-en-temps-reel/ 问题是我如何继续此结果以ge坐标(6,113204,49,610280)并将标记放在地图上,这里是链接https://data.public.lu/zh/datasets/arrets-de-运输公共和离开卷筒/
From this url you get the id for the request. 从该URL中,您可以获得请求的ID。
http://travelplanner.mobiliteit.lu/hafas/query.exe/dot?performLocating=2&tpl=stop2csv&stationProxy=yes &look_maxdist=250&look_x=6112550&look_y=49610700 http://travelplanner.mobiliteit.lu/hafas/query.exe/dot?performLocating=2&tpl=stop2csv&stationProxy=yes&look_maxdist = 250&look_x = 6112550&look_y = 49610700
Now you received response as below : 现在您收到以下响应:
id=A=1@O=Belair,%20Sacré-Coeur@X=6,113204@Y=49,610279@U=82@L=200403005@B=1@p=1459856195
id = A = 1 @ O = Belair,%20Sacré-Coeur@ X = 6,113204 @ Y = 49,610279 @ U = 82 @ L = 200403005 @ B = 1 @ p = 1459856195
Now, append received response with below url and you will get the response in json. 现在,在下面的URL后面附加收到的响应,您将在json中获得响应。
http://travelplanner.mobiliteit.lu/restproxy/departureBoard?accessId=cdt&format=json& http://travelplanner.mobiliteit.lu/restproxy/departureBoard?accessId=cdt&format=json&
For example: 例如:
http://travelplanner.mobiliteit.lu/restproxy/departureBoard?accessId=cdt&format=json&id=A=1@O=Belair,%20Sacré-Coeur@X=6,113204@Y=49,610279@U=82@L=200403005@B=1@p=1459856195 http://travelplanner.mobiliteit.lu/restproxy/departureBoard?accessId=cdt&format=json&id=A=1@O=Belair,%20Sacré-Coeur@X=6,113204@Y=49,610279@U=82@L = 200403005 @ B = 1 @ p = 1459856195
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.