Code Samples

Stay organized with collections Save and categorize content based on your preferences.

All of the examples contained in the Maps JavaScript API documentation set are listed below for quick reference.

Basics

Events

Controls and Interaction

Customizing a Map

Drawing on the Map

Layers

Vector Map Features

MapTypes

From our Terms of Service

Innovate, but don't
duplicate

Don't make a substitute for Google Maps. If your app's primary purpose is navigation, a business directory, or a general purpose "maps app", it's a substitute for Google Maps.

Learn more

Services

Libraries: Drawing

Libraries: Geometry

Libraries: Local Context

Places

Fun