Code Samples

  • This page provides a comprehensive list of sample applications showcasing the features of the Maps JavaScript API.

  • These samples cover a wide range of topics including basic map manipulation, event handling, customization, drawing tools, layers, services and more.

  • The samples are categorized for easy navigation and include links to detailed documentation and tutorials.

  • Users can explore examples for specific functionalities like adding markers, drawing shapes, using layers, and integrating with various Google Maps services.

  • The page also includes links to sample code for libraries such as Drawing and Geometry, and experimental features like 3D maps.

Select platform: Android iOS JavaScript

Sample apps demonstrating the features of the Maps JavaScript API are listed below for quick reference. For samples that include step-by-step walkthoughs, see our tutorials.

Basics

Events

Controls and Interaction

Customize a Map

Data-driven styling for boundaries

Web Components

Add markers to the Map

Advanced Markers

Markers (Legacy)

Draw on the Map

Layers

Vector Map Features

3D Maps (Experimental)

MapTypes

Services

Libraries: Drawing

Libraries: Geometry

Address Validation

Places (New)

Places Service (Legacy)

React Google Maps Library

Fun