1

I am working on an Android application that uses Google Maps and draws polylines on the map. I wanted to know if there is a way to draw a dotted polyline (similar to the one Google Maps shows when displaying a walking route) and how should I do that.

I have looked into the PolylineOptions object but I didn't find a method that would help me.

Is there a way do draw a dotted polyline? If so what is the method?

Thanks.

xomena
  • 31,125
  • 6
  • 88
  • 117
Ancuta
  • 183
  • 2
  • 6
  • 15

1 Answers1

8

As of February 2017, Google released a new set of customizations for polylines and polygons in Google Maps Android API v2. Now you can create dashed or dotted polylines.

See information about new features in the Shapes Guide. See an example in the Polylines and Polygons tutorial.

You can also read the corresponding blog post here:

https://maps-apis.googleblog.com/2017/02/styling-and-custom-data-for-polylines.html

xomena
  • 31,125
  • 6
  • 88
  • 117
  • 2
    Please don't add the [same answer to multiple questions](http://meta.stackexchange.com/questions/104227/is-it-acceptable-to-ad??d-a-duplicate-answer-to-several-questions). Answer the best one and flag the rest as duplicates, once you earn enough reputation. If it is not a duplicate, tailor the post to the question – Manfred Radlwimmer Mar 14 '17 at 15:50
  • 1
    Thanks Manfred, Xomena does not have enough reputation yet to mark as duplicate. What do you suggest is best in such situation? – kaskader Mar 14 '17 at 18:55