当我运行第一个带有起始点、目的地和路径点的Google API url时,它返回
https://maps.googleapis.com/maps/api/directions/json?origin=9.6614981,80.0255464999999&waypoints=6.9040322,79.948803&destination=6.053518500000001,6.053518500000001%7c&sensor=false
{
"geocoded_waypoints" : [
{},
{},
{
"geocoder_status" : "ZERO_RESULTS"
}
],
"routes" : [],
"status" : "NOT_FOUND"
}
{
"geocoded_waypoints" : [
{
"geocoder_status" : "OK",
"place_id" : "ChIJnbKVwttW4joR96eguc1D88A",
"types" : [ "route" ]
},
{
"geocoder_status" : "OK",
"place_id" : "ChIJnVoMvVZX4joRcAOUeZGMTUA",
"types" : [ "street_address" ]
}
],
"routes" : [
{
"bounds" : {
"northeast" : {
"lat" : 6.916328699999999,
"lng" : 79.972351
},
"southwest" : {
"lat" : 6.9033429,
"lng" : 79.9247644
}
},
"copyrights" : "Map data ©2017 Google",
"legs" : [
{
"distance" : {
"text" : "6.9 km",
"value" : 6928
},
"duration" : {
"text" : "18 mins",
"value" : 1109
},
"end_address" : "19/7 Bogahahena Rd, Sri Jayawardenepura Kotte 10120, Sri Lanka",
"end_location" : {
"lat" : 6.9058178,
"lng" : 79.9247644
},
"start_address" : "Pasan Mawatha, Malabe, Sri Lanka",
"start_location" : {
"lat" : 6.914893699999999,
"lng" : 79.9702508
},
"steps" : [
{
"distance" : {
"text" : "0.2 km",
"value" : 167
},
"duration" : {
"text" : "1 min",
"value" : 50
},
"end_location" : {
"lat" : 6.916328699999999,
"lng" : 79.97066389999999
},
"html_instructions" : "Head \u003cb\u003enorth\u003c/b\u003e on \u003cb\u003ePasan Mawatha\u003c/b\u003e toward \u003cb\u003eWelivita Rd\u003c/b\u003e\u003cdiv style=\"font-size:0.9em\"\u003ePass by Boys Hostel (on the right)\u003c/div\u003e",
"polyline" : {
"points" : "aqei@aebgNg@GWEOEUKaAY{AWK?O?"
},
"start_location" : {
"lat" : 6.914893699999999,
"lng" : 79.9702508
},
"travel_mode" : "DRIVING"
},
{
"distance" : {
"text" : "0.2 km",
"value" : 202
},
"duration" : {
"text" : "1 min",
"value" : 42
},
"end_location" : {
"lat" : 6.915699,
"lng" : 79.972351
},
"html_instructions" : "Turn \u003cb\u003eright\u003c/b\u003e onto \u003cb\u003eWelivita Rd\u003c/b\u003e",
"maneuver" : "turn-right",
"polyline" : {
"points" : "azei@sgbgNBg@BQHc@J[Va@LQHOFOLm@He@No@"
},
"start_location" : {
"lat" : 6.916328699999999,
"lng" : 79.97066389999999
},
"travel_mode" : "DRIVING"
},
{
"distance" : {
"text" : "2.8 km",
"value" : 2757
},
"duration" : {
"text" : "7 mins",
"value" : 426
},
"end_location" : {
"lat" : 6.903943,
"lng" : 79.9549985
},
"html_instructions" : "Turn \u003cb\u003eright\u003c/b\u003e at Petti Kade onto \u003cb\u003eB263\u003c/b\u003e\u003cdiv style=\"font-size:0.9em\"\u003ePass by Super Como Technologies (on the right)\u003c/div\u003e",
"maneuver" : "turn-right",
"polyline" : {
"points" : "cvei@erbgN|@J`@DbAHb@@hBFn@?t@@^?rAAhAA\\AX?b@?R@RBTBPBPDXH\\H\\Jz@X|Cr@LFHBJDNHLDLHLJPJNLJNLNJRLTHTHV|@lC`@fAHTDPDPBJ@J@T@TAVAVCVIb@KZKVO\\KTM`@AJALALAN@RBZDZF^FZFVHPFPFNFDPRJHVNXLrAj@FBn@Zn@XXNVNTLPJXPXVd@b@@@PRZ`@JRL\\Rl@^`AJZDFXp@DLPd@Xn@JVNX\\j@b@p@^l@h@fA\\z@Pb@t@xBVp@ZhAVlANv@ZpADd@BZ@L@d@@TANCTE^Gh@Mp@Qz@APIZI\\EZI`@Ef@Ej@Ef@Gz@Cd@"
},
"start_location" : {
"lat" : 6.915699,
"lng" : 79.972351
},
"travel_mode" : "DRIVING"
},
{
"distance" : {
"text" : "3.7 km",
"value" : 3722
},
"duration" : {
"text" : "9 mins",
"value" : 564
},
"end_location" : {
"lat" : 6.9052345,
"lng" : 79.9251951
},
"html_instructions" : "At \u003cb\u003eMalabe\u003c/b\u003e, continue onto \u003cb\u003eකෝට්ටේ - බෝපේ පාර\u003c/b\u003e/\u003cb\u003eB240\u003c/b\u003e\u003cdiv style=\"font-size:0.9em\"\u003ePass by Megacity (on the left in 350 m)\u003c/div\u003e",
"polyline" : {
"points" : "slci@we_gNEj@Cl@CPCTERKZM\\Ql@Wn@Wz@Oz@GZALAN?Z?N@L?HBPBVZnBD\\@L@J@L@H?J?F?HAH?HCFAHEJGLMZKV}@bBUb@s@jAm@jAKPKNOZARQd@Qp@M`@[hASr@a@~AYfA]dAM^CJEFMNOPOHi@Xc@Tc@X_@Tq@h@OLOPQROPEJKRELADERMl@I`@I^I`@APCL?JAP?N@H@RDPBJPh@FNDNFPBH@JBLBNBV?@D\\FrAD~@Bv@@V?R?`@?^?`DAd@An@Cj@EzAAx@A`AAnA@`@@T@TBPFPDNDNFPJVVv@N\\b@hAVr@JXHVFTFTJl@Ff@Fj@B^@V?Z?^?b@?n@ErDChAEl@C^G`@UpAMh@Q~@Ox@EX?TETCLAJAJ?L?H@H@FBDBFDDDFBBJHFBFFLJNFNBJ@RBN@J?V@p@BL@XDXFRFPFVJTLRLPNXTHJJJFNDN@L@NALCPERGVw@~DMf@EPABAJCPAN@L@LDPFLJPHFJHJHPHNLLH^V"
},
"start_location" : {
"lat" : 6.903943,
"lng" : 79.9549985
},
"travel_mode" : "DRIVING"
},
{
"distance" : {
"text" : "80 m",
"value" : 80
},
"duration" : {
"text" : "1 min",
"value" : 27
},
"end_location" : {
"lat" : 6.9058178,
"lng" : 79.9247644
},
"html_instructions" : "Turn \u003cb\u003eright\u003c/b\u003e at okvel auto care onto \u003cb\u003eBogahahena Rd\u003c/b\u003e\u003cdiv style=\"font-size:0.9em\"\u003ePass by Waruna Motors (on the left)\u003c/div\u003e\u003cdiv style=\"font-size:0.9em\"\u003eDestination will be on the right\u003c/div\u003e",
"maneuver" : "turn-right",
"polyline" : {
"points" : "utci@okyfNc@\\IFgAp@"
},
"start_location" : {
"lat" : 6.9052345,
"lng" : 79.9251951
},
"travel_mode" : "DRIVING"
}
],
"traffic_speed_entry" : [],
"via_waypoint" : []
}
],
"overview_polyline" : {
"points" : "aqei@aebgN_AMe@QaAY{AW[?Fy@T_Ad@s@P_@VsANo@|@JdBNlCHxE?dDCnALfBd@z@X|Cr@VJv@^^VZ\\Xb@Vj@fAdDj@|APz@Bj@Cn@Mz@Wr@[r@Ol@CZ?b@Hv@Nz@Ph@N`@XXb@XdDxAvBfAj@\\~@z@RTf@t@lAhDv@lBd@fAl@dAbA~AfAbCfA|Cr@zBf@dCZpADd@Dh@Bz@SnBk@zCOx@OhAWtDIxAGf@q@zBo@jBWvAC\\?j@H`Ad@fDBj@Ed@]~@iAzBiAnBuAhCARQd@_@rAkBdHu@xB]`@y@b@gAn@qA~@_@^a@d@Yr@g@bCOlAA`@B\\H\\Xx@Rv@Jv@LpBHvB@lBAfEEzAGtCCpCBv@Df@ZbAvAvDt@zBRbANrADrB?rAI|FIlA]rB_@hBUrA?TETEXAX@RNZ\\XTR^Jz@FhADf@Fl@Nh@RtA`ATVL^B\\E^sArGMr@?\\F^R^TPz@j@^Vc@\\qAx@"
},
"summary" : "B263 and කෝට්ටේ - බෝපේ පාර/B240",
"warnings" : [],
"waypoint_order" : []
}
],
"status" : "OK"
}
检查你的目的地Latlng。你问的第一个链接是从斯里兰卡到尼日利亚的导航(6.053518500000001,6.05351850000000)。我认为您添加了不匹配的目的地,即,您使用相同的纬度值经度也。检查你的密码。
问题内容: 一个简单的问题:是否可以返回in的值? 然后在我的: 编辑:这是很久以前我不熟悉Java的地方问的,现在我对它有了更好的了解,我将做一个简短的总结: 异步任务的要点是该任务为,这意味着调用该任务后,该任务将在其自己的线程上开始运行。从asynctask返回一个值将毫无意义,因为原始的调用线程已经进行了其他工作(因此该任务是异步的)。 考虑时间:在某个时间点,你启动了一个将与主线程并行运
问题内容: 我正在尝试简单地在android的webview中设置和检索cookie。我尝试了许多cookie管理器脚本来尝试使它工作。我启用了JavaScript。 在Samsung S3和Samsung Galaxy Tab 10.1上运行该应用程序时,cookie似乎根本没有设置(android 4.1)。但是,在Samsung Galaxy ace,HTC Desire Z和android
我正在写一个Android应用程序,它将连接到一个特定的WPA接入点,当连接时,它将发出一个超文本传输协议调用。它不会保存网络配置。我几乎读过关于连接到wifi网络的堆栈溢出的每一篇文章,但找不到适合我的答案。这是我用来连接的代码... 然而,netId总是-1。我曾在两款不同的手机上试用过(ICS:HTC Rezound和GingerBread:Motorola DroidX)。两者显示出完全相
问题内容: 有没有办法让ProGuard返回发生崩溃的行号?我可以使用该方法,但是对于诸如此类的可能性很多,并且在一大段代码中,它非常难以确定根本原因,因为您必须检查每个对象,并且它是生命周期以确保没有任何问题错误。如果ProGuard可以将其缩小到我的行号,那将真的有帮助。 问题答案: 将此行添加到您的proguard-project.txt文件中。 http://proguard.source
这一行是: 我在和上尝试了和,但仍然给出相同的错误
如何在volley中发出JSON请求,我需要在正文中发送一个验证头和JSON对象,并且我只希望得到一个状态代码200的答案 我尝试了使用string或JSON object,object的不同类型的响应侦听器,但总是出现错误:android volley org.JSON.JSONException:在字符0的输入结束 或者volley中是否有其他类型的请求支持json对象和主体中的验证头,并且响