How to transform an android google maps standart polyline into blue circles?

160 views Asked by At

If you open up a google maps app on your phone, select any destination and set mode to "WALKING", the standart polyline transforms into blue little circles.

How do I achieve it programmatically?

I see a year old discussion here, but they are also clueless: https://productforums.google.com/forum/#!topic/maps/j9iEMmZ_oXI

1

There are 1 answers

0
Andrii Omelchenko On

Seems there is no possibilities to do it with Google Maps API, but You can try to get directions and use Overlay like in this answer of mnish and for drawing circles instead of solid line in

public void draw(Canvas canvas, MapView mapv, boolean shadow){
    ...
}

you can use that approach (do not pay attention to the fact that answer is about Mabpox - in both cases drawing on Canvas should be used) based on setPathEffect() method of Paint class (briefly for this You should create path for "circle stamp" (in pixels), which will repeated every "advance" (in pixels too)).