Skip to content

Author & Maintainer (Google)

Google Maps JavaScript API loader and TypeScript typings

I maintained the official Maps JavaScript API loader and the auto-generated TypeScript typings at Google.

combined weekly npm downloads
29M+
repositories
77
loader weekly downloads
about 8.3M
@types/google.maps weekly
13M+

Source: googlemaps/js-api-loader on GitHub, @googlemaps/js-api-loader on npm, and @types/google.maps on npm.

What I owned

As a Senior Developer Relations Engineer at Google, I wrote and maintained the official JavaScript API loader (about 8.3M weekly npm downloads) and the auto-generated TypeScript typings, @types/google.maps (13M+ weekly). I also maintained marker clustering (about 3.9M weekly) and the Node.js SDKs.

Purpose

Loading Maps on the web used to mean pasting a script tag and waiting on a global callback. The loader returns a promise, so you can load Maps from any bundler or framework. For the typings, I built a generator that worked from the Closure Compiler externs behind the Maps API and used custom AST parsing to turn them into TypeScript definitions. The types stay in sync with the real API. Developers get accurate autocomplete and type checks, and nobody hand-writes types.

Who it was for

Web developers adding maps to React, Angular, Vue or plain JS apps, at startups and large enterprises.

Impact

Across my Maps and Workspace packages, 29M+ combined weekly npm downloads in 77 repositories.

Loader usage from the package README

import { setOptions, importLibrary } from "@googlemaps/js-api-loader";

setOptions({ key: GOOGLE_MAPS_API_KEY });
await importLibrary("core");