You're all set!

To start developing, please head over to our developer documentation.

Activate the Google Maps JavaScript API

To get you started we'll guide you through the Google Developers Console to do a few things first:

  1. Create or choose a project
  2. Activate the Google Maps JavaScript API and related services
  3. Create appropriate keys
Continue

Libraries

The JavaScript code for the Maps API is loaded via a bootstrap URL of the form https://maps.googleapis.com/maps/api/js. This bootstrap request loads all of the main Javascript objects and symbols for use in the Maps API. Some Maps API features are also available in self-contained libraries which are not loaded unless you specifically request them. Breaking up supplemental components into libraries allows the main API to load (and parse) quickly; you only incur the additional overhead of loading and parsing libraries if you need them.

You specify additional libraries to load within the bootstrap request by specifying a libraries parameter, passing that parameter the name of the library or libraries. Multiple libraries may be specified as a comma-separated list. Once loaded, libraries are accessed via the google.maps.libraryName namespace.

The following libraries are available:

  • drawing provides a graphical interface for users to draw polygons, rectangles, polylines, circles, and markers on the map. Consult the Drawing library documentation for more information.
  • geometry includes utility functions for calculating scalar geometric values (such as distance and area) on the the surface of the earth. Consult the Geometry library documentation for more information.
  • places enables your application to search for Places such as establishments, geographic locations, or prominent points of interest, within a defined area. Please read the Places library documentation for more information.
  • visualization provides visual representations of data, including heatmaps and Google Maps Engine data. Please read the Visualization library documentation for more information.

The following bootstrap request illustrates how to request the google.maps.geometry library of the Maps Javascript API:

<script type="text/javascript"
  src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&libraries=geometry">
</script>

To request multiple libraries, separate them with a comma:

<script type="text/javascript"
  src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&libraries=geometry,places">
</script>

Send feedback about...

Google Maps JavaScript API
Google Maps JavaScript API
Need help? Visit our support page.