Samples for the Google Maps JavaScript v3 API
Samples for the Google Maps JavaScript API.
The samples can be demoed at the official documentation site.
npm i
Install dependencies.npm run build
Build all targets and update dist/
folder.npm test
Test outputs.npm run lint
Fix lint issues with npm run format
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>
.npm start
For staging samples (not common), use Cloud Source Repositories which are controlled by an access control list.
gcloud auth login
git config --global credential.https://source.developers.google.com.helper gcloud.sh
git remote add google https://source.developers.google.com/p/geo-devrel-javascript-samples/r/js-samples
git push google
git rev-parse --short HEAD
or visit the bucket.All samples can be explored at https://googlemaps.github.io/js-samples/.
npm i -D @types/google.maps
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.