packages/core/src/lib/directives/polygon.ts
AgmPolygon renders a polygon on a AgmMap
```typescript
agm-map {
height: 300px;
}
],
OnDestroy
OnChanges
AfterContentInit
Selector | agm-polygon |
Properties |
|
Methods |
|
Inputs |
Outputs |
constructor(_polygonManager: PolygonManager)
|
||||||
Parameters :
|
clickable | |
Default value : true
|
|
Indicates whether this Polygon handles mouse events. Defaults to true. |
editable | |
Default value : false
|
|
If set to true, the user can edit this shape by dragging the control points shown at the vertices and on each segment. Defaults to false. |
fillColor | |
Type : string
|
|
The fill color. All CSS3 colors are supported except for extended named colors. |
fillOpacity | |
Type : number
|
|
The fill opacity between 0.0 and 1.0 |
polyDraggable | |
Default value : false
|
|
If set to true, the user can drag this shape over the map. The geodesic property defines the mode of dragging. Defaults to false. |
strokeColor | |
Type : string
|
|
The stroke color. All CSS3 colors are supported except for extended named colors. |
strokeOpacity | |
Type : number
|
|
The stroke opacity between 0.0 and 1.0 |
strokeWeight | |
Type : number
|
|
The stroke width in pixels. |
visible | |
Type : boolean
|
|
Whether this polygon is visible on the map. Defaults to true. |
zIndex | |
Type : number
|
|
The zIndex compared to other polys. |
polyClick | |
Type : EventEmitter<google.maps.PolyMouseEvent>
|
|
This event is fired when the DOM click event is fired on the Polygon. |
polyDblClick | |
Type : EventEmitter<google.maps.PolyMouseEvent>
|
|
This event is fired when the DOM dblclick event is fired on the Polygon. |
polyDrag | |
Type : EventEmitter<google.maps.MouseEvent>
|
|
This event is repeatedly fired while the user drags the polygon. |
polyDragEnd | |
Type : EventEmitter<google.maps.MouseEvent>
|
|
This event is fired when the user stops dragging the polygon. |
polyDragStart | |
Type : EventEmitter<google.maps.MouseEvent>
|
|
This event is fired when the user starts dragging the polygon. |
polyMouseDown | |
Type : EventEmitter<google.maps.PolyMouseEvent>
|
|
This event is fired when the DOM mousedown event is fired on the Polygon. |
polyMouseMove | |
Type : EventEmitter<google.maps.PolyMouseEvent>
|
|
This event is fired when the DOM mousemove event is fired on the Polygon. |
polyMouseOut | |
Type : EventEmitter<google.maps.PolyMouseEvent>
|
|
This event is fired on Polygon mouseout. |
polyMouseOver | |
Type : EventEmitter<google.maps.PolyMouseEvent>
|
|
This event is fired on Polygon mouseover. |
polyMouseUp | |
Type : EventEmitter<google.maps.PolyMouseEvent>
|
|
This event is fired whe the DOM mouseup event is fired on the Polygon |
polyPathsChange | |
Type : EventEmitter
|
|
This event is fired after Polygon first path changes. |
polyRightClick | |
Type : EventEmitter<google.maps.PolyMouseEvent>
|
|
This event is fired when the Polygon is right-clicked on. |
Private _addEventListeners |
_addEventListeners()
|
Returns :
void
|
Private _init |
_init()
|
Returns :
void
|
Private _updatePolygonOptions | ||||||
_updatePolygonOptions(changes: SimpleChanges)
|
||||||
Parameters :
Returns :
google.maps.PolygonOptions
|
getPath |
getPath()
|
Returns :
Promise<google.maps.LatLng[]>
|
getPaths |
getPaths()
|
Returns :
Promise<[][]>
|
id |
id()
|
Returns :
string
|
ngAfterContentInit |
ngAfterContentInit()
|
Returns :
void
|
ngOnChanges | ||||||
ngOnChanges(changes: SimpleChanges)
|
||||||
Parameters :
Returns :
any
|
ngOnDestroy |
ngOnDestroy()
|
Returns :
void
|
Private _id |
Type : string
|
Private _polygonAddedToManager |
Default value : false
|
Private _subscriptions |
Type : Subscription[]
|
Default value : []
|