{"id":26466043,"url":"https://github.com/rmnblm/graphhopperrouting","last_synced_at":"2025-09-24T01:49:16.887Z","repository":{"id":56912937,"uuid":"87239254","full_name":"rmnblm/GraphHopperRouting","owner":"rmnblm","description":"🗺 The GraphHopper Routing API wrapped in an easy-to-use Swift framework.","archived":false,"fork":false,"pushed_at":"2019-07-16T08:51:32.000Z","size":44,"stargazers_count":4,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-04T14:01:52.882Z","etag":null,"topics":["directions","graphhopper","openstreetmap","routing","swift"],"latest_commit_sha":null,"homepage":"https://www.graphhopper.com","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/rmnblm.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-04-04T22:00:47.000Z","updated_at":"2020-04-12T17:40:33.000Z","dependencies_parsed_at":"2022-08-21T03:20:32.410Z","dependency_job_id":null,"html_url":"https://github.com/rmnblm/GraphHopperRouting","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmnblm%2FGraphHopperRouting","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmnblm%2FGraphHopperRouting/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmnblm%2FGraphHopperRouting/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rmnblm%2FGraphHopperRouting/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rmnblm","download_url":"https://codeload.github.com/rmnblm/GraphHopperRouting/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244413462,"owners_count":20448710,"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":["directions","graphhopper","openstreetmap","routing","swift"],"created_at":"2025-03-19T11:08:22.196Z","updated_at":"2025-09-24T01:49:11.850Z","avatar_url":"https://github.com/rmnblm.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GraphHopperRouting\n[![](http://img.shields.io/badge/ios-8.0+-FC3159.svg)]()\n[![](http://img.shields.io/badge/swift-3.0+-FD9426.svg)]()\n[![](https://img.shields.io/badge/cocoapods-compatible-53D769.svg)](https://github.com/cocoapods/cocoapods)\n[![](https://img.shields.io/badge/license-MIT-lightgrey.svg)](http://mit-license.org)\n\n🗺 The GraphHopper Routing API wrapped in an easy-to-use Swift framework.\n\nThe Routing API is part of the [GraphHopper Directions API](https://graphhopper.com/#directions-api). Routing is the process of finding the 'best' path(s) between two or more points, where best depends on the vehicle and use case. With our API you have a fast and solid way to find this best path.\n\n## Installation\n\nUse [CocoaPods](http://cocoapods.org/) to install the framework. Add this to your Podfile:\n\n``` ruby\npod 'GraphHopperRouting'\n```\n\nThen run the following command:\n\n```\n$ pod install\n```\n\nIn order to use the framework, you'll also need a [GraphHopper Access Token](https://graphhopper.com/dashboard/#/api-keys). You can either set your access token in the `Info.plist` (Key is GraphHopperAccessToken) or pass it as an argument to the initializer of the `Routing` class.\n\n## Example\n\n### Basics\n\nSetup the `Routing` class\n\n``` swift\nimport CoreLocation\nimport GraphHopperRouting\n\n// use this\nlet routing = Routing(accessToken: \"YOUR ACCESS TOKEN\")\n// or if you have set your access token in the Info.plist\nlet routing = Routing()\n```\n\n### Route options\n\nSpecify multiple points for which the route should be calculated.\n\n```swift\nlet points = [\n    CLLocationCoordinate2D(latitude: 52.545669, longitude: 13.359375),\n    CLLocationCoordinate2D(latitude: 52.543164, longitude: 13.399887)\n]\n```\n\nConfigure the route options\n\n``` swift\nlet options = RouteOptions(points)\noptions.elevation = true\noptions.instructions = true\noptions.locale = \"de-DE\"\noptions.vehicle = .foot\noptions.optimize = true\n```\n\n### Flexible route options\n\nFlexible route options are used to specify flexible features when querying the GraphHopper Routing API.\n\n```swift\nlet options = FlexibleRouteOptions()\noptions.weighting = .shortest\noptions.algorithm = .dijkstrabi\n```\n\n### Routing request\n\nMake the async request by calling the `calculate(_:completionHandler)` method and passing the options.\n\n```swift\nlet task = routing.calculate(options, completionHandler: { (paths, error) in\n    paths?.forEach({ path in\n        print(path.time)\n        print(path.distance)\n        print(path.descend)\n        print(path.ascend)\n        path.points.forEach({ point in\n        \tprint(point)\n        })\n    })\n})\n```\n\n## More information\n\nFor more information, consider reading the [official documentation](https://graphhopper.com/api/1/docs/routing/) to learn more about the options and the result.\n\n## License\n\nThis project is released under the [MIT license](LICENSE).\n\n## About\n\n\u003cimg src=\"images/HSRLogo.png\" width=\"184\" /\u003e\n\nThe GraphHopper Routing Swift Framework is crafted with :heart: by [@rmnblm](https://github.com/rmnblm) and [@iphilgood](https://github.com/iphilgood) during the Bachelor thesis at [HSR University of Applied Sciences](https://www.hsr.ch) in Rapperswil.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frmnblm%2Fgraphhopperrouting","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frmnblm%2Fgraphhopperrouting","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frmnblm%2Fgraphhopperrouting/lists"}