TypeScript

js-samples

Samples for the Google Maps JavaScript v3 API

G

googlemaps

Dernière activité 24 juin 2026
googlemaps/js-samples

805

étoiles

834

forks

72

issues ouvertes

google-mapsgooglemapsjavascriptjs-samplesmapssamplestypescript

Ce README est souvent en anglais.

Test Release GitHub contributors Apache-2.0 Discord

js-samples

Description

Samples for the Google Maps JavaScript API.

The samples can be demoed at the official documentation site.

Development

Build

  1. npm i Install dependencies.
  2. npm run build Build all targets and update dist/ folder.

Test

  1. npm test Test outputs.
  2. (Optional) npm run lint Fix lint issues with npm run format
  3. (Optional) npm run test:playwright:playground:update-snapshots Update snapshots. This uses an custom env var to only to only update screenshots that differ from the previous ones (Playwright only supports none, all, or missing). To update all screenshots, use npm run test:playwright:playground:update-snapshots -- --update-snapshots. It's possible to target a single sample by using -g <sample-name>.

Run

  1. Start a server with all samples using npm start

Staging

For staging samples (not common), use Cloud Source Repositories which are controlled by an access control list.

  1. gcloud auth login
  2. git config --global credential.https://source.developers.google.com.helper gcloud.sh
  3. git remote add google https://source.developers.google.com/p/geo-devrel-javascript-samples/r/js-samples
  4. git push google
  5. git rev-parse --short HEAD or visit the bucket.

Explore

All samples can be explored at https://googlemaps.github.io/js-samples/.

Other resources

Support

These libraries are community supported. We're comfortable enough with the stability and features of the libraries that we want you to build real production applications on it.

If you find a bug, or have a feature suggestion, please log an issue. If you'd like to contribute, please read How to Contribute.

Projets similaires

React Google Maps API

TypeScriptgatsbygoogle-mapgoogle-map-react
JJustFly1984
2 k étoiles448

Node.js client library for Google Maps API Web Services

TypeScriptclient-librarydirectionselevation
Ggooglemaps
3,1 k étoiles654

React components and hooks for the Google Maps JavaScript API

TypeScriptgoogle-mapsgoogle-maps-apireact
Vvisgl
1,9 k étoiles195