android-maps-utils icon indicating copy to clipboard operation
android-maps-utils copied to clipboard

Support arrows along polylines

Open barbeau opened this issue 4 years ago • 11 comments

Is your feature request related to a problem? Please describe. As of April 2020 the Android Maps SDK supports "Line caps" so you can you alter the end of a polylines: https://developers.google.com/maps/documentation/android-sdk/shapes#line_caps

This allows you to create arrow heads at the end of lines - see the blog post for more links and this screenshot:

image

It would be nice to have the ability to specify arrows along the polyline as well. This helps indicate direction of flow on longer lines where the entire line may not be visible within the view portal (e.g., a public transportation route). Here's a quick mockup:

image

An issue has been open on the main Google tracker for the Android SDK for this feature since 2017 with a P4, with a last activity date of Mar 6, 2019, so it doesn't seem to be moving forward there: https://issuetracker.google.com/issues/38512792

Describe the solution you'd like Provide a utility function to render a line on the map with arrows along the line (e.g., every X meters, or divide the line into X parts with arrows equally spaced). It shouldn't be difficult to support arrows along lines within the utility library by decomposing a line into smaller segments and rendering each of those lines with line caps using the native Maps SDK.

Describe alternatives you've considered Do nothing - wait for the Android SDK to maybe natively support this someday

Additional context Android Maps SDK issue for arrows along lines - https://issuetracker.google.com/issues/38512792

barbeau avatar Apr 30 '20 19:04 barbeau

Please consider this. I am very interested! It would be such a useful feature.

SebastianOltmanns avatar Jul 02 '20 07:07 SebastianOltmanns

This issue has been automatically marked as stale because it has not had recent activity. Please comment here if it is still valid so that we can reprioritize. Thank you!

stale[bot] avatar Oct 31 '20 03:10 stale[bot]

Still valid

barbeau avatar Nov 02 '20 14:11 barbeau

I also have the same need. I wish I could add markers every x meters. On mapbox there is a possibility with the SymbolLayer. I don't understand why there isn't an alternative on google maps too.

fctaddia avatar Nov 16 '20 14:11 fctaddia

This issue has been automatically marked as stale because it has not had recent activity. Please comment here if it is still valid so that we can reprioritize. Thank you!

stale[bot] avatar Mar 19 '21 23:03 stale[bot]

Still valid. Would still be a very good feature!

SebastianOltmanns avatar Mar 20 '21 08:03 SebastianOltmanns

This issue has been automatically marked as stale because it has not had recent activity. Please comment here if it is still valid so that we can reprioritize. Thank you!

stale[bot] avatar Jul 20 '21 23:07 stale[bot]

This issue has been automatically marked as stale because it has not had recent activity. Please comment here if it is still valid so that we can reprioritize. Thank you!

stale[bot] avatar Jan 03 '22 20:01 stale[bot]

Still valid.

SebastianOltmanns avatar Jan 03 '22 21:01 SebastianOltmanns

Would love to see this feature

thomaskroth avatar Apr 24 '22 18:04 thomaskroth

This issue has been automatically marked as stale because it has not had recent activity. Please comment here if it is still valid so that we can reprioritize. Thank you!

stale[bot] avatar Sep 21 '22 02:09 stale[bot]

I believe this is fulfilled with polyline customization now available in version 18.1.0 or later of the Maps SDK for Android with the latest renderer enabled. See more examples in the announcement blog post.

wangela avatar Jan 24 '23 18:01 wangela