0

次のように、ソースポイントと宛先ポイントを使用して次のURLを作成しました

String jsonURL = "http://maps.googleapis.com/maps/api/directions/json?";
        final StringBuffer sBuf = new StringBuffer(jsonURL);
        sBuf.append("origin=");
        sBuf.append(start.getLatitudeE6()/1E6);
        sBuf.append(',');
        sBuf.append(start.getLongitudeE6()/1E6);
        sBuf.append("&destination=");
        sBuf.append(dest.getLatitudeE6()/1E6);
        sBuf.append(',');
        sBuf.append(dest.getLongitudeE6()/1E6);
        sBuf.append("&sensor=true&mode=driving");

最終URLは

http://maps.googleapis.com/maps/api/directions/json?origin=17.449672,78.373002&destination=40.686245,-93.399375&sensor=true&mode=driving

しかし、私は「ルート」を取得しています:[]。そのため、ソースと宛先の間のパスを描画できません。ここで何がうまくいかなかったのか、誰でも教えてもらえますか。

4

1 に答える 1

1

インドのハイデラバードから米国のアラートンまでのルートがあるとどのように期待できますか。それがルートがゼロである理由です。これを試してみると、適切な結果が返されます

于 2013-04-02T05:15:23.947 に答える