Gmaps
Google Maps API + Angula
npm i -P @angeeks/gmaps
Usages
setup
+ import { GmapsModule, gmapsKey } from '@angeeks/gmaps';
@NgModule({
imports: [
+ GmapsModule
],
providers: [
+ { provide: gmapsKey, useValue: 'your-key' }
]
})
export class AppComponent {}
// component.html
+ <ngk-gmaps [options]='options'></ngk-gmaps>
// component.ts
+ import { GmapsComponent } from '@angeeks/gmaps';
export class AppComponent {
+ options = { center: { lat: 0, lng: 0 }, zoom: 10 };
}
// component.scss
:host {
ngk-gmaps {
height: 400px;
width: 400px;
}
}