Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow custom (destination) annotations #268

Merged
merged 2 commits into from
Jun 8, 2017
Merged

Allow custom (destination) annotations #268

merged 2 commits into from
Jun 8, 2017

Conversation

bsudekum
Copy link
Contributor

@bsudekum bsudekum commented Jun 8, 2017

This addition allows the developer to provide a custom annotation image for all annotations on the map. Note, the only annotations on the map currently is the destination marker.

/cc @frederoni

@bsudekum bsudekum requested a review from frederoni June 8, 2017 17:32

If this method is unimplemented, the navigation map view will represent the destination annotation with the default marker.
*/
@objc optional func navigationMapView(_ mapView: MGLMapView, imageFor annotation: MGLAnnotation) -> MGLAnnotationImage?
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this instead be:

@objc optional func navigationMapView(_ mapView: NavigationMapView, imageFor annotation: MGLAnnotation) -> MGLAnnotationImage?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's stick with MGLMapView for now. Makes it easier to find the right documentation.

@frederoni
Copy link
Contributor

Image annotations is a good start but we should also expose mapView(_:viewFor:) for full customizability, but that could be tail work. It would also require the user to provide a user puck.

@bsudekum bsudekum merged commit b765cef into master Jun 8, 2017
@bsudekum bsudekum deleted the toggle branch June 8, 2017 21:58
@bsudekum bsudekum mentioned this pull request Jun 13, 2017
2 tasks
@1ec5 1ec5 added this to the v0.5.0 milestone Jul 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants