I'm using Angular Google Maps and agm-drawing-manager Drawing Manager using AGM-POLYGON

Now having two issues one is not working multiple polygons inside

<agm-map [latitude]="latitude" [longitude]="longitude" [zoom]="zoom" class="cardMapH" #agmMap>
                        <agm-polygon [paths]="pathsOfPoly"></agm-polygon>
                        <agm-drawing-manager (polygonComplete)="polygonCreated($event)" [drawingControl]="managerOptions.drawingControl" [drawingControlOptions]="managerOptions.drawingControlOptions" [polygonOptions]='managerOptions.polygonOptions' [drawingMode]='managerOptions.drawingMode'>
                        </agm-drawing-manager>
                    </agm-map>

Not getting co-ordinates after drawing the Polygon

Please help me out to solve these issues, Thanks in advance

1 Answers

0
ramana vv On

Finally, I did like this and it's working for me

<mat-card class="cardMapHcard">
                    <!-- yes {{plraw}} -->
                    <agm-map [latitude]="latitude" [longitude]="longitude" [zoom]="zoom" class="cardMapH" #agmMap>
                        <agm-polygon [paths]="pathsOfPol" fillColor="#f44195" fillOpacity=".35" strokeColor="#f44195" *ngFor="let pathsOfPol of pathsOfPolyArr">
                            <!-- <agm-snazzy-info-window [maxWidth]="200" [closeWhenOthersOpen]="true">
                                <ng-template>
                                    My first Snazzy Info Window!
                                </ng-template>
                            </agm-snazzy-info-window> -->
                        </agm-polygon>
                        <agm-drawing-manager (overlayComplete)="overlayCreated($event)" (polygonComplete)="polygonCreated($event)" [drawingControl]="managerOptions.drawingControl" [drawingControlOptions]="managerOptions.drawingControlOptions" [polygonOptions]='managerOptions.polygonOptions' [drawingMode]='managerOptions.drawingMode'>
                        </agm-drawing-manager>
                    </agm-map>
                </mat-card>
            </mat-card-content>
        </mat-card>