Awesome
js-samples
Description
Samples for the Google Maps JavaScript API.
The samples can be demoed at the official documentation site.
Development
Build
npm i
Install dependencies.npm run build
Build all targets and updatedist/
folder.
Test
npm test
Test outputs.- (Optional)
npm run lint
Fix lint issues withnpm run format
- (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 supportsnone
,all
, ormissing
). To update all screenshots, usenpm run test:playwright:playground:update-snapshots -- --update-snapshots
. It's possible to target a single sample by using-g <sample-name>
.
Run
- 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.
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.
Explore
All samples can be explored at https://googlemaps.github.io/js-samples/.
Other resources
- Google Maps JavaScript API Documentation
- Google Maps JavaScript API Reference Documentation
- Google Maps Typings -
npm i -D @types/google.maps
- Google Maps Utilities
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.