# Map Drawing for AGM

-----

this package adds drawing support to [AGM][agm2].

## Installation

```sh
npm install @agm2/drawing
# or
yarn add @agm2/drawing
```

## Usage

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 '@agm2/core';
import { AgmDrawingModule } from '@agm2/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
<agm2-map style="height: 300px" [latitude]="51.673858" [longitude]="7.815982" [agmDrawingManager]="drawing">
</agm2-map>
<agm2-drawing-manager #drawing="agmDrawingManager" [drawingMode]="'circle'" [circleOptions]="{fillColor:'red', radius: 150}"></agm2-drawing-manager>
```


[drawing-manager]: https://developers.google.com/maps/documentation/javascript/reference/#drawing
[agm2]: https://angular-maps.com/
