问题描述:

Hi i am developing a application where i tracks users current location periodically and update the path in Google map by drawing polylines . I am Not sure how to do that. Please Help me Out in this issue.

网友答案:

After drawing the Polyline for the first time, you can "update" that polyline by retrieving the actual points (getPoints()) and then adding the new location to that list, then updating PolylinePoints (setPoints()) https://developer.android.com/reference/com/google/android/gms/maps/model/Polyline.html#getPoints()

Keep in mind that getPoints gives you a COPY of the points, not the reference to the list.

相关阅读:
Top