https://github.com/googlemaps-samples/js-api-samples
The home of Google Maps JavaScript API documentation samples.
https://github.com/googlemaps-samples/js-api-samples
Last synced: 8 months ago
JSON representation
The home of Google Maps JavaScript API documentation samples.
- Host: GitHub
- URL: https://github.com/googlemaps-samples/js-api-samples
- Owner: googlemaps-samples
- License: apache-2.0
- Created: 2024-02-01T16:53:03.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-06-12T21:11:54.000Z (8 months ago)
- Last Synced: 2025-06-12T22:26:49.488Z (8 months ago)
- Language: TypeScript
- Homepage:
- Size: 1.09 MB
- Stars: 5
- Watchers: 7
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: docs/contributing.md
- License: LICENSE
- Code of conduct: docs/code-of-conduct.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# js-api-samples
## Description
Welcome to the js-api-samples repository, the home of Google Maps JavaScript API documentation samples.
## Important Note: Repository Migration in Progress
This repository (`js-api-samples`) is the new home for the Maps JavaScript API samples.
We are currently migrating all samples from the old repository (`js-samples`). During this transition,
you may find some samples are still missing or under development.
* [**js-samples GitHub Repository:**](https://github.com/googlemaps/js-samples)
* [**Maps JavaScript API Documentation:**](https://developers.google.com/maps/documentation/javascript/)
We appreciate your patience as we complete this migration. Please check back regularly for updates.
Try the examples out at [Google Maps JavaScript API documentation](https://developers.google.com/maps/documentation/javascript/examples).
## Development
Each example is one atomic unit, for which dependencies must be individually set up.
### Build samples
1. Run `npm i` to install dependencies. You only need to do this once, and
thereafter only to update dependencies.
1. Navigate to the top level (`samples/`).
- To build a single sample, run `npm run build --workspace=sample-name/`
- To build all samples, run `npm run build-all`.
Build output is copied to the main `dist/` folder. Each individual sample folder
also contains a `dist/` folder, but this is only used by Vite for live preview.
### Run a single sample
1. Navigate to the folder for the sample you want to run (`cd samples/sample-name`).
1. Run `npm start` to start a server with that sample.
### Testing
- To test, navigate to project root and run `npx playwright test`. {# TODO: Expand this section. #}
## Contributing
Contributions are welcome! Please see [contributing](../docs/contributing.md) for more information.
## Terms of Service
This library uses Google Maps Platform services. Use of Google Maps Platform services through this library is subject to the Google Maps Platform [Terms of Service](https://cloud.google.com/maps-platform/terms).
This library is not a Google Maps Platform Core Service. Therefore, the Google Maps Platform Terms of Service (e.g. Technical Support Services, Service Level Agreements, and Deprecation Policy) do not apply to the code in this library.
## Support
This library is offered via an open source [license](https://www.apache.org/licenses/LICENSE-2.0). It is not governed by the Google Maps Platform Support [Technical Support Services Guidelines](https://cloud.google.com/maps-platform/terms/tssg), the [SLA](https://cloud.google.com/maps-platform/terms/sla), or the [Deprecation Policy](https://cloud.google.com/maps-platform/terms) (however, any Google Maps Platform services used by the library remain subject to the Google Maps Platform Terms of Service).
This library adheres to [semantic versioning](https://semver.org/) to indicate when backwards-incompatible changes are introduced. Accordingly, while the library is in version 0.x, backwards-incompatible changes may be introduced at any time.
If you find a bug, or have a feature request, please [file an issue]() on GitHub. If you would like to get answers to technical questions from other Google Maps Platform developers, ask through one of our [developer community channels](https://developers.google.com/maps/developer-community). If you'd like to contribute, please check the [Contributing guide]().
You can also discuss this library on our [Discord server](https://discord.gg/hYsWbmk).