【问题标题】:Android - Google Maps V2 : Send latitude and longitude coordinates in URL StringBuilderAndroid - Google Maps V2:在 URL StringBuilder 中发送纬度和经度坐标
【发布时间】:2013-12-03 08:25:54
【问题描述】:

我有 2 个位置,由用户提供。 例如这些: 编辑出发=法国; editArrivee = 英格兰; (确实是示意图)

然后,为了在这两个位置之间绘制路线,我这样做了:

        final StringBuilder url = new StringBuilder("http://maps.googleapis.com/maps/api/directions/xml?sensor=false&language=fr");
        url.append("&origin=");
        url.append(editDepart.replace(' ', '+'));
        url.append("&destination=");
        url.append(editArrivee.replace(' ', '+'));

        //Calling the Web service
        final InputStream stream = new URL(url.toString()).openStream();

我可以用经纬度坐标替换 editDepart=France 吗?

提前感谢您的回答!

最好的问候,

豆腐

【问题讨论】:

    标签: android google-maps geolocation gps coordinates


    【解决方案1】:
    猜你喜欢
    • 2013-02-23
    • 2015-05-06
    • 2016-04-07
    • 1970-01-01
    • 2017-01-18
    • 1970-01-01
    • 2013-03-20
    • 2013-12-16
    • 1970-01-01
    相关资源
    最近更新 更多