Open
Description
Feature Description
Hi, old AGM - Angular Google Maps has polygon paths change event and it is so useful. Now I'm converting my components from AGM to google-maps component but it does not support polygon paths change event. It would be great if this component support polygon paths change event like old agm component.
My old implementation
<agm-map
[latitude]="latitude"
[longitude]="longitude"
(mapReady)="onMapReady($event)"
>
<agm-polygon
*ngFor="let shape of shapes"
[paths]="shape.paths"
[strokeColor]="getColor(shape)"
[strokeWeight]="shape.zIndex === 1 ? 3 : 1"
[fillColor]="getColor(shape)"
[fillOpacity]="getOpacity(shape)"
[editable]="shape.editable"
[zIndex]="shape.zIndex"
(polyMouseOver)="polyMouseOver($event, shape.shapeName)"
(polyMouseOut)="polyMouseOut()"
(polyClick)="polyClick($event, shape)"
(polyPathsChange)="polyPathsChange($event)"
(polyRightClick)="polyRightClick($event, shape)"
>
</agm-polygon>
</agm-map>
New implementation with google-map
<google-map
[options]="mapOptions"
(mapInitialized)="onMapReady($event)"
(mouseout)="onMapMouseOut()"
>
<map-polygon
*ngFor="let shape of shapes"
[paths]="shape.paths"
[options]="{
strokeColor: getColor(shape),
strokeWeight: shape.zIndex === 1 ? 3 : 1,
fillColor: getColor(shape),
fillOpacity: getOpacity(shape),
zIndex: shape.zIndex,
editable: shape.editable
}"
(polygonMouseover)="polyMouseOver($event, shape.shapeName)"
(polygonMouseout)="polyMouseOut()"
(polygonClick)="polyClick($event, shape)"
(polygonRightclick)="polyRightClick($event, shape)"
>
</map-polygon>
</google-map>
Use Case
In my use case I control intersection and cover functionality with old component polyPathsChange
event, now I can't control them with efficient way so it is super powerful and helpful feature to be when google-map support polygonPathsChange
event itself as old component support.