Drawing Library

DrawingManager class

class google.maps.drawing.DrawingManager extends MVCObject
library "drawing"

Allows users to draw markers, polygons, polylines, rectangles, and circles on the map. The DrawingManager's drawing mode defines the type of overlay that will be created by the user. Adds a control to the map, allowing the user to switch drawing mode.

const {DrawingManager} = await google.maps.importLibrary("drawing");
Inherited: MVCObject
Inherited: addListener, bindTo, get, notify, set, setValues, unbind, unbindAll

OverlayType constants

constants google.maps.drawing.OverlayType
library "drawing"

The types of overlay that may be created by the DrawingManager. Specify these by value, or by using the constant's name. For example, 'polygon' or google.maps.drawing.OverlayType.POLYGON.

These constants are also usable as strings. In TypeScript, the string literals are defined by the OverlayTypeString type.

const {OverlayType} = await google.maps.importLibrary("drawing");
CIRCLE Specifies that the DrawingManager creates circles, and that the overlay given in the overlaycomplete event is a circle.
MARKER Specifies that the DrawingManager creates markers, and that the overlay given in the overlaycomplete event is a marker.
POLYGON Specifies that the DrawingManager creates polygons, and that the overlay given in the overlaycomplete event is a polygon.
POLYLINE Specifies that the DrawingManager creates polylines, and that the overlay given in the overlaycomplete event is a polyline.
RECTANGLE Specifies that the DrawingManager creates rectangles, and that the overlay given in the overlaycomplete event is a rectangle.