Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

[iOS, macOS] Add support for dash patterns for Polyline Annotations #7331

Closed

Conversation

JesseCrocker
Copy link
Contributor

This adds a new method to MGLMapViewDelegate -mapView:lineDasharrayForPolylineAnnotation: to enable proving dash patterns for Polyline annotations.

@mention-bot
Copy link

@JesseCrocker, thanks for your PR! By analyzing this pull request, we identified @jfirebaugh, @yhahn and @1ec5 to be potential reviewers.

@1ec5
Copy link
Contributor

1ec5 commented Dec 7, 2016

Thanks for the PR. We’ve wanted to add this functionality to the annotation API ever since we made it, and now it’s possible thanks to the runtime styling API. However, MGLMapViewDelegate has grown unwieldy with so many styling-related methods, and delegate methods have proven to be rather inconvenient for this purpose versus directly styling an object. As a result, we’re planning to steer developers towards the runtime styling API whenever more advanced styling is required.

That said, there have been proposals to bridge the two APIs, such as #1734 (comment), which proposes a delegate method that provides a “prototype style layer” for a particular annotation. If implementing that general-purpose approach minimizes the amount of maintenance overhead for annotations going forward, that might be a viable path forward for the functionality you’re after. Otherwise, reimplementing polyline annotations as MGLLineStyleLayers would be your best bet.

@JesseCrocker
Copy link
Contributor Author

Thanks for the explanation.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants