android-maps-utils
android-maps-utils copied to clipboard
Support arrows along polylines
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:
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:
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
Please consider this. I am very interested! It would be such a useful feature.
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!
Still valid
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.
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!
Still valid. Would still be a very good feature!
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!
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!
Still valid.
Would love to see this feature
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!
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.