{"id":15683393,"url":"https://github.com/fortmarek/annotationeta","last_synced_at":"2026-03-02T22:31:15.097Z","repository":{"id":56902035,"uuid":"80659572","full_name":"fortmarek/AnnotationETA","owner":"fortmarek","description":"AnnotationETA - Apple-like way to display ETA, directions...","archived":false,"fork":false,"pushed_at":"2017-02-08T11:38:13.000Z","size":13104,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-07T13:01:46.935Z","etag":null,"topics":["map","mapkit","mkannotation"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fortmarek.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-01T20:13:56.000Z","updated_at":"2025-02-23T14:03:48.000Z","dependencies_parsed_at":"2022-08-20T18:20:44.704Z","dependency_job_id":null,"html_url":"https://github.com/fortmarek/AnnotationETA","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/fortmarek/AnnotationETA","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fortmarek%2FAnnotationETA","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fortmarek%2FAnnotationETA/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fortmarek%2FAnnotationETA/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fortmarek%2FAnnotationETA/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fortmarek","download_url":"https://codeload.github.com/fortmarek/AnnotationETA/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fortmarek%2FAnnotationETA/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260029211,"owners_count":22948117,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["map","mapkit","mkannotation"],"created_at":"2024-10-03T17:04:55.405Z","updated_at":"2026-03-02T22:31:14.967Z","avatar_url":"https://github.com/fortmarek.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AnnotationETA\n\n[![CI Status](http://img.shields.io/travis/fortmarek/AnnotationETA.svg?style=flat)](https://travis-ci.org/fortmarek/AnnotationETA)\n[![Version](https://img.shields.io/cocoapods/v/AnnotationETA.svg?style=flat)](http://cocoapods.org/pods/AnnotationETA)\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n[![License](https://img.shields.io/cocoapods/l/AnnotationETA.svg?style=flat)](http://cocoapods.org/pods/AnnotationETA)\n[![Platform](https://img.shields.io/cocoapods/p/AnnotationETA.svg?style=flat)](http://cocoapods.org/pods/AnnotationETA)\n\n\n## AnnotationETA\n\nAnnotationETA will easily let you implement MapKit annotations with slick pins, custom colors and cool calloutView showing ETA out of the box!\n\n![demo](https://github.com/fortmarek/AnnotationETA/blob/master/screens/annotationEta.gif)\n\n## Example\n\nTo run the example project, clone the repo, and run `pod install` from the Example directory first.\n\n## Installation\n\n### CocoaPods\n\nAnnotationETA is available through [CocoaPods](http://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```ruby\npod \"AnnotationETA\"\n```\n\n### Carthage\n\nTo integrate AnnotationETA into your Xcode project using Carthage, specify it in your Cartfile:\n\n```ruby\ngithub \"fortmarek/AnnotationETA\"\n```\n\n### Manually\n\nInclude all the files under AnnotationETA/Classes into your project.\n\n\n## Set Up\n\nIn `func mapView(_ mapView: MKMapView, viewFor annotation: MKAnnotation)` set your `MKAnnotationView` to `AnnotationEtaView`:\n```swift \nlet annotationEtaView = EtaAnnotationView(annotation: annotation, reuseIdentifier: \"etaAnnotationIdentifier\")\nannotationView = annotationEtaView\n```\n\nTo display ETA when the annotation is selected:\n\n```swift\nfunc mapView(_ mapView: MKMapView, didSelect view: MKAnnotationView) {\nguard let annotation = view.annotation else {return}\nif annotation is MKUserLocation {return}\n\nview.leftCalloutAccessoryView = DirectionButton(destinationCoordinate: annotation.coordinate, locationManager: self.locationManager, transportType: .automobile, destinationName: annotation.title ?? \"\")\n}\n```\n\n## Detail Button\n\nWith detail button you can point to another view controller where you can display additional information about the annotation. Right under initializing etaAnnotationView write this:\n\n```swift \nannotationEtaView.setDetailShowButton()\nannotationEtaView.rightButton?.addTarget(self, action: #selector(detailButtonTapped), for: .touchUpInside)\n```\n\nThe action then should trigger function showing the detailViewController and also passing the information from the selected annotation, for example like this:\n\n```swift\nfunc detailButtonTapped() {\nguard\nmapView.selectedAnnotations.count == 1,\nlet detailViewController = UIStoryboard(name: \"Main\", bundle: nil).instantiateViewController(withIdentifier: \"detailVC\") as? DetailViewController\nelse {return}\n\ndetailViewController.annotation = mapView.selectedAnnotations[0]\n\nself.present(detailViewController, animated: true, completion: nil)\n}\n```\n\n## Customization\n\n### Pin Color\n\nPin color not only sets the color of the pin, but left and rightCalloutAccessoryView as well\n\n```swift \nannotationEtaView.pinColor = UIColor.blue\n```\n\n## More\n\nFor more detailed implementation take a look at the example or contact me.\n\n## Author\n\nfortmarek, marekfort@me.com\n\n## License\n\nAnnotationETA is available under the MIT license. See the LICENSE file for more info.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffortmarek%2Fannotationeta","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffortmarek%2Fannotationeta","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffortmarek%2Fannotationeta/lists"}