Get a Maps Demo Key: Try out select Maps JavaScript API and Places UI Kit features at no cost with a Maps Demo Key—no billing information required.

Draw on the map

You can add objects to the map to designate points, lines, areas, or collections of objects. The 3D Maps in Maps JavaScript API calls these objects overlays. Overlays are tied to geographic coordinates, so they move when you drag or zoom the map.

Overlay types

The 3D Maps in Maps JavaScript API supports several different types of overlays that you can add programmatically:

  • A popover is a special kind of overlay for displaying content (usually text or images) at a given location on a map. Popovers are analogous to Info windows in the Maps JavaScript API.
  • Lines on the map are displayed using polylines , represented as an ordered sequence of points connected by line segments.
  • Areas of arbitrary shape on the map are displayed using polygons . Like polylines, polygons are an ordered sequence of locations. Unlike polylines, polygons define a region which they enclose.
  • Models are gLTF resources that are rendered on the map as 3D shapes.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026年09月01日 UTC.