update polyline according to the user moving android googleMaps v2

后端 未结 3 1465
忘掉有多难
忘掉有多难 2020-12-06 12:00

I have googleMap (v2) with polyline that presents a route between the user current location and the destination point.
Now, I want to update the polyline according to th

3条回答
  •  离开以前
    2020-12-06 12:27

    The only way as of version 3.1.36:

    List points = polyline.getPoints();
    points.add(newPoint);
    polyline.setPoints(points);
    

    Hopefully the API will be enhanced in later versions.

提交回复
热议问题