Decoding polyline with new Google Maps API

后端 未结 6 1680
时光取名叫无心
时光取名叫无心 2020-12-07 21:12

I am drawing a route between two points in a map. I receive the points this way:

StringBuilder urlString = new StringBuilder();
    urlString.append("htt         


        
6条回答
  •  春和景丽
    2020-12-07 22:00

    For those who need this now, there's an open-source library with a lot of useful stuff regarding the Google Maps Android API, including decoding and encoding of polylines.

    Check it out at Android Maps Utils and Android Maps Util Github. For decoding and encoding use:

    PolyUtil.decode(String encodedPath);
    PolyUtil.encode(List path);
    

提交回复
热议问题