API Reference

This documentation is divided into several sections:

  • Map. The Map object is the map on your page. It lets you access methods and properties for interacting with the map's style and layers, respond to events, and manipulate the user's perspective with the camera.
  • Properties and options. This section describes Mapbox GL JS's global properties and options that you might want to access while initializing your map or accessing information about its status.
  • Markers and controls. This section describes the user interface elements that you can add to your map. The items in this section exist outside of the map's canvas element.
  • Geography and geometry. This section includes general utilities and types that relate to working with and manipulating geographic information or geometries.
  • User interaction handlers. The items in this section relate to the ways in which the map responds to user input.
  • Sources. This section describes the source types Mapbox GL JS can handle besides the ones described in the Mapbox Style Specification.
  • Events and event types. This section describes the different types of events that Mapbox GL JS can raise.

Each section describes classes or objects as well as their properties, parameters, instance members, and associated events. Many sections also include inline code examples and related resources.