Angular Google Maps (AGM) extension for google maps drawing library
npm install @ngx-google-maps-tk/drawing-----
this package adds drawing support to [AGM][agm].
``sh`
npm install @agm/drawingor
yarn add @agm/drawing
1. Import the module
`typescript`
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component'
// add these imports
import { AgmCoreModule } from '@agm/core';
import { AgmDrawingModule } from '@agm/drawing'
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
AgmCoreModule.forRoot({
apiKey: ['YOUR_API_KEY_HERE'],
libraries: ['drawing']
}),
AgmDrawingModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
2. use it in your template
`html``
[drawing-manager]: https://developers.google.com/maps/documentation/javascript/reference/#drawing
[agm]: https://angular-maps.com/