Skip to content

DrawingManager for Maps #18599

@mirnpnh

Description

@mirnpnh

Documentation Feedback

Couldn't find any information in regard to how to use DrawingMananger with Maps component.
I have tried following snippet but it neither works or throws any error:

this.drawingManager = new google.maps.drawing.DrawingManager({
      drawingMode: google.maps.drawing.OverlayType.POLYGON,
      drawingControl: true,
      drawingControlOptions: {
        position: google.maps.ControlPosition.TOP_CENTER,
        drawingModes: [google.maps.drawing.OverlayType.POLYGON]
      }
});
this.drawingManager.setMap(this.map._googleMap);

I have already added libraries=drawing in maps import of index.html too.

https://stackblitz.com/edit/angular-vvwbdg

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions