{"id":25757858,"url":"https://github.com/ngominhtrint/googlemapdirectionlib","last_synced_at":"2025-05-13T00:35:21.725Z","repository":{"id":56912927,"uuid":"263612566","full_name":"ngominhtrint/GoogleMapDirectionLib","owner":"ngominhtrint","description":"Wrapped the direction api of Google Map for easier to use.","archived":false,"fork":false,"pushed_at":"2020-05-17T08:47:23.000Z","size":366,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-16T21:03:51.405Z","etag":null,"topics":["cocoapods","directions","directions-api","google-maps-api","ios","swift"],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ngominhtrint.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":"2020-05-13T11:40:07.000Z","updated_at":"2023-03-17T04:52:37.000Z","dependencies_parsed_at":"2022-08-20T20:50:26.835Z","dependency_job_id":null,"html_url":"https://github.com/ngominhtrint/GoogleMapDirectionLib","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngominhtrint%2FGoogleMapDirectionLib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngominhtrint%2FGoogleMapDirectionLib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngominhtrint%2FGoogleMapDirectionLib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngominhtrint%2FGoogleMapDirectionLib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ngominhtrint","download_url":"https://codeload.github.com/ngominhtrint/GoogleMapDirectionLib/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253850531,"owners_count":21973662,"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":["cocoapods","directions","directions-api","google-maps-api","ios","swift"],"created_at":"2025-02-26T16:33:23.956Z","updated_at":"2025-05-13T00:35:21.701Z","avatar_url":"https://github.com/ngominhtrint.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GoogleMapDirectionLib\nWrapped the direction api of Google Map for easier to use.\n\n### Reference\n\nBy inspiration on this Android repo [GoogleDirectionLibrary](https://github.com/akexorcist/GoogleDirectionLibrary). I try to wrap Google Map Direction Api for iOS.\n\n### Install\n\n```\npod 'GoogleMapDirectionLib'\n```\n\n### Use\n\n```\nclass ViewController: UIViewController {\n  \n  override func viewDidLoad() {\n    super.viewDidLoad()\n    \n    GoogleDirection.withServerKey(apiKey: GOOGLE_MAP_API_KEY)\n      .from(origin: CLLocationCoordinate2D(latitude: 37.7681994, longitude: -122.444538))\n      .to(destination: CLLocationCoordinate2D(latitude: 37.7749003, longitude: -122.4034934))\n      .avoid(avoid: AvoidType.FERRIES)\n      .avoid(avoid: AvoidType.HIGHWAYS)\n      .transportMode(transportMode: TransportMode.DRIVING)\n      .execute(callback: self)\n  }\n}\n\nextension ViewController: DirectionCallback {\n  \n  func onDirectionSuccess(direction: Direction) {\n    if(direction.isOK()) {\n      // Draw polyline\n    } else {\n      // Do something\n    }\n  }\n  \n  func onDirectionFailure(error: Error) {\n    // Do something\n  }\n}\n```\n\n## Contribution\n\n- Welcome everyone to contribute, review and point out my bad. \n\n## Licence\n\n```\nCopyright 2020 Rover Dream.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fngominhtrint%2Fgooglemapdirectionlib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fngominhtrint%2Fgooglemapdirectionlib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fngominhtrint%2Fgooglemapdirectionlib/lists"}