- Notifications
You must be signed in to change notification settings - Fork28
This is the directive for @agm/core (not official)
License
MIT, Unknown licenses found
Licenses found
MIT
LICENSEUnknown
license-banner.txtNotificationsYou must be signed in to change notification settings
explooosion/Agm-Direction
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Agm-Direction is the directive for@agm/core (not official)
- Angular
- Google Map API
How to use?
👉Start Reading👉Build With Ionic
Installation is done using thenpm install
command:
Use npm
npm install --save @agm/core agm-direction
Use yarn
yarn add @agm/core agm-direction
import{BrowserModule}from'@angular/platform-browser';import{NgModule}from'@angular/core';import{AppComponent}from'./app.component';import{AgmCoreModule}from'@agm/core';//@agm/coreimport{AgmDirectionModule}from'agm-direction';// agm-direction@NgModule({declarations:[AppComponent],imports:[BrowserModule,AgmCoreModule.forRoot({//@agm/coreapiKey:'your key',}),AgmDirectionModule,// agm-direction],providers:[],bootstrap:[AppComponent]})exportclassAppModule{}
HTML
<agm-map[latitude]="lat"[longitude]="lng"><agm-direction[origin]="origin"[destination]="destination"></agm-direction></agm-map>
CSS
agm-map {height:400px;}
TS
publiclat=24.799448;publiclng=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';}
- DocumentAgm-Direction-Docs
- Less usefulAgmDirectionModule
git clone https://github.com/explooosion/Agm-Direction.git
npm install
npm run build
npm run pack:lib
cd playground&& npm install
# Add gmap api key in environment.ts
npm start
This library generated byangular-library-starter.
About
This is the directive for @agm/core (not official)
Topics
Resources
License
MIT, Unknown licenses found
Licenses found
MIT
LICENSEUnknown
license-banner.txtCode of conduct
Stars
Watchers
Forks
Packages0
No packages published