{"id":21623048,"url":"https://github.com/explooosion/agm-direction","last_synced_at":"2025-04-07T10:29:14.188Z","repository":{"id":44937222,"uuid":"112103392","full_name":"explooosion/Agm-Direction","owner":"explooosion","description":"This is the directive for @agm/core (not official)","archived":false,"fork":false,"pushed_at":"2024-05-07T22:39:34.000Z","size":3484,"stargazers_count":75,"open_issues_count":17,"forks_count":28,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-31T09:05:23.267Z","etag":null,"topics":["agm","angular","angular6","direction","directions","directive","gmaps","gmaps-api","googlemaps","map"],"latest_commit_sha":null,"homepage":"https://robby570.tw/Agm-Direction-Docs/","language":"TypeScript","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/explooosion.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-26T17:42:38.000Z","updated_at":"2024-06-16T16:58:33.000Z","dependencies_parsed_at":"2024-06-18T15:23:30.163Z","dependency_job_id":"b716a605-c40c-4f81-a77a-1662861e9498","html_url":"https://github.com/explooosion/Agm-Direction","commit_stats":null,"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/explooosion%2FAgm-Direction","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/explooosion%2FAgm-Direction/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/explooosion%2FAgm-Direction/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/explooosion%2FAgm-Direction/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/explooosion","download_url":"https://codeload.github.com/explooosion/Agm-Direction/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247635149,"owners_count":20970682,"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":["agm","angular","angular6","direction","directions","directive","gmaps","gmaps-api","googlemaps","map"],"created_at":"2024-11-25T00:11:27.309Z","updated_at":"2025-04-07T10:29:14.162Z","avatar_url":"https://github.com/explooosion.png","language":"TypeScript","readme":"# Agm-Direction\n\n[![npm version](https://badge.fury.io/js/agm-direction.svg)](https://badge.fury.io/js/agm-direction)\n[![npm](https://img.shields.io/npm/dm/localeval.svg)](https://github.com/explooosion/Agm-Direction)\n[![Build Status](https://travis-ci.org/explooosion/Agm-Direction.svg?branch=master)](https://travis-ci.org/explooosion/Agm-Direction)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](http://makeapullrequest.com)\n\n\n[Agm-Direction](https://github.com/explooosion/Agm-Direction) is the directive for [@agm/core](https://github.com/SebastianM/angular-google-maps) (not official)\n\n- Angular\n- Google Map API\n\nHow to use?  \n👉 [Start Reading](https://robby570.tw/Agm-Direction-Docs/)\n👉 [Build With Ionic](https://github.com/explooosion/ionic-agm-direction-example)\n\n\n![Agm-Direction](https://i.imgur.com/DCIoXqS.jpg)\n\n## Credit\n\n#### [SebastianM/angular-google-maps](https://github.com/SebastianM/angular-google-maps) - [Directions service #495](https://github.com/SebastianM/angular-google-maps/issues/495)\n\n## Installation\n\nInstallation is done using the\n[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):\n\n- Use npm\n  ```bash\n  npm install --save @agm/core agm-direction\n  ```\n\n- Use yarn\n  ```bash\n  yarn add @agm/core agm-direction\n  ```\n\n## Importing Modules\n\n```typescript\nimport { BrowserModule } from '@angular/platform-browser';\nimport { NgModule } from '@angular/core';\nimport { AppComponent } from './app.component';\n\nimport { AgmCoreModule } from '@agm/core';            // @agm/core\nimport { AgmDirectionModule } from 'agm-direction';   // agm-direction\n\n@NgModule({\n  declarations: [\n    AppComponent\n  ],\n  imports: [\n    BrowserModule,\n    AgmCoreModule.forRoot({ // @agm/core\n      apiKey: 'your key',\n    }),\n    AgmDirectionModule,     // agm-direction\n  ],\n  providers: [],\n  bootstrap: [AppComponent]\n})\nexport class AppModule { }\n```\n\n## Usage\n\nHTML\n\n```html\n\u003cagm-map [latitude]=\"lat\" [longitude]=\"lng\"\u003e\n  \u003cagm-direction \n    [origin]=\"origin\" \n    [destination]=\"destination\"\n  \u003e\n  \u003c/agm-direction\u003e\n\u003c/agm-map\u003e\n```\n\nCSS\n\n```css\nagm-map {\n    height: 400px;\n}\n```\n\nTS\n\n```typescript\npublic lat = 24.799448;\npublic lng = 120.979021;\n\npublic origin: any;\npublic destination: any;\n\nngOnInit() {\n  this.getDirection();\n}\n\ngetDirection() {\n  this.origin = { lat: 24.799448, lng: 120.979021 };\n  this.destination = { lat: 24.799524, lng: 120.975017 };\n\n  // Location within a string\n  // this.origin = 'Taipei Main Station';\n  // this.destination = 'Taiwan Presidential Office';\n}\n```\n\n## Document\n- Document [Agm-Direction-Docs](https://robby570.tw/Agm-Direction-Docs/)\n- Less useful [AgmDirectionModule](https://robby570.tw/Agm-Direction/)\n\n## Development\n\n👉 [Playground Project](https://github.com/explooosion/Agm-Direction/tree/master/playground)\n\n```bash\ngit clone https://github.com/explooosion/Agm-Direction.git\n```\n\n```bash\nnpm install\n```\n\n```bash\nnpm run build\n```\n\n```bash\nnpm run pack:lib\n```\n\n```bash\ncd playground \u0026\u0026 npm install\n```\n\n```bash\n# Add gmap api key in environment.ts\n```\n\n```bash\nnpm start\n```\n\n## Generator \nThis library generated by [angular-library-starter](https://github.com/robisim74/angular-library-starter).\n\n## License\n\n[MIT](http://opensource.org/licenses/MIT)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexplooosion%2Fagm-direction","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexplooosion%2Fagm-direction","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexplooosion%2Fagm-direction/lists"}