androidgoogle-mapsandroid-mapviewgoogle-maps-android-api-2

How to draw dashed polyline with android google map sdk v2?


I've looked through the documentation of polyline and there is no option to make it dashed.

Do anybody know how to draw dashed polyline with android google map sdk v2?


Solution

  • It is not possible in current release. Follow this issue for updates: https://code.google.com/p/gmaps-api-issues/issues/detail?id=4633

    UPDATE

    Recently, Google implemented this feature for polylines in Google Maps Android API v2 and marked issue 4633 as Fixed.

    See information about stroke patterns 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