简体   繁体   中英

How to draw route with multiple via point on google map api android

I want to draw route on Google Map API in android studio from point A to point G, so I need to specified the B,C,D,E,and F via point between point A to G, but most of sample just explains about draw a via point, as example from point A to point C, then the via point is B. please help me.

regards

I believe you are looking for polylineOptions

PolylineOptions polylineOptions = new PolylineOptions();
// add the various point with 
polylineOptions.add(latLng);
//adn add to google map using
googleMap.addPolyline(polylineOptions);

the link can help you other stuff you can do with polyline.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM