GitPedia

Agm Direction

This is the directive for @agm/core (not official)

From explooosion·Updated June 16, 2026·View on GitHub·
·Archived

This project has been officially archived and will no longer receive updates, bug fixes, or feature additions. We will not be reviewing new issues or pull requests. The project is written primarily in TypeScript, distributed under the MIT License license, first published in 2017. Key topics include: agm, angular, angular6, direction, directions.

Latest release: 0.8.10
January 17, 2022View Changelog →

⚠️ DEPRECATION NOTICE: This repository is no longer maintained.

This project has been officially archived and will no longer receive updates, bug fixes, or feature additions. We will not be reviewing new issues or pull requests.

A huge thank you to all the contributors and developers who have supported, used, and helped maintain this project over the years. Your efforts and contributions are deeply appreciated!

Agm-Direction

npm version
npm
Build Status
PRs Welcome

Agm-Direction is the directive for @agm/core (not official)

  • Angular
  • Google Map API

How to use?
👉 Start Reading
👉 Build With Ionic

Agm-Direction

Credit

SebastianM/angular-google-maps - Directions service #495

Installation

Installation is done using the
npm install command:

  • Use npm

    bash
    npm install --save @agm/core agm-direction
  • Use yarn

    bash
    yarn add @agm/core agm-direction

Importing Modules

typescript
import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { AppComponent } from './app.component'; import { AgmCoreModule } from '@agm/core'; // @agm/core import { AgmDirectionModule } from 'agm-direction'; // agm-direction @NgModule({ declarations: [ AppComponent ], imports: [ BrowserModule, AgmCoreModule.forRoot({ // @agm/core apiKey: 'your key', }), AgmDirectionModule, // agm-direction ], providers: [], bootstrap: [AppComponent] }) export class AppModule { }

Usage

HTML

html
<agm-map [latitude]="lat" [longitude]="lng"> <agm-direction [origin]="origin" [destination]="destination" > </agm-direction> </agm-map>

CSS

css
agm-map { height: 400px; }

TS

typescript
public lat = 24.799448; public lng = 120.979021; public origin: any; public destination: any; ngOnInit() { this.getDirection(); } getDirection() { this.origin = { lat: 24.799448, lng: 120.979021 }; this.destination = { lat: 24.799524, lng: 120.975017 }; // Location within a string // this.origin = 'Taipei Main Station'; // this.destination = 'Taiwan Presidential Office'; }

Document

Development

👉 Playground Project

bash
git clone https://github.com/explooosion/Agm-Direction.git
bash
npm install
bash
npm run build
bash
npm run pack:lib
bash
cd playground && npm install
bash
# Add gmap api key in environment.ts
bash
npm start

Generator

This library generated by angular-library-starter.

License

MIT

Contributors

Showing top 7 contributors by commit count.

View all contributors on GitHub →

This article is auto-generated from explooosion/Agm-Direction via the GitHub API.Last fetched: 6/28/2026