Introducing a new way to review your PRs.

Read the announcement

visgl / react-google-maps

React components and hooks for the Google Maps JavaScript API

View on GitHub

19 documents · Updated Nov 2, 2026

overview

Knowledge Base updated: 2026-11-01

react-google-maps knowledge base

@vis.gl/react-google-maps provides React bindings for the Google Maps JavaScript API. Its main surfaces are API loading, 2D and 3D map components, overlays, Static Maps URL utilities, and package entry points for browser and server-safe use.

Runtime state is held in provider and map-instance contexts: the API provider owns script readiness, while map components own native Google Maps instances and synchronize camera, options, events, and React children.

Examples exercise the exported surfaces across framework integrations. Package metadata defines the public browser, 3D, compatibility, and server entry points.

flowchart TD
  App[React application] --> Provider[APIProvider]
  Provider --> Loader[Google Maps JS API loader]
  Loader --> MapsAPI[Google Maps JavaScript API]
  Provider --> Map[Map]
  Map --> MapContext[Map instance context]
  Map --> Camera[Camera synchronization]
  Map --> Controls[MapControl]
  Map --> Overlays[2D overlays]
  Provider --> Map3D[Map3D]
  Map3D --> Scene[3D scene elements]
  Map3D --> Map3DContext[3D map context]
  App --> Static[StaticMap and URL utilities]
  Package[Package entry points] --> Provider
  Package --> Static
  Examples[Examples and framework apps] --> Package

Glossary

  • APIProvider: The provider that configures and exposes Google Maps JavaScript API loading state.
  • Map instance context: Context used to register, select, and retrieve active 2D map instances.
  • Controlled camera: Camera values supplied by React props and reconciled with native map camera changes.
  • Map3D: The 3D Google Maps custom-element integration and its associated context.
  • Server entry point: Export surface intended for map-related output that does not require browser rendering.

Invariants

Routing table