|
1 | 1 | # js-api-samples |
| 2 | + |
| 3 | +## Description |
| 4 | + |
| 5 | +Samples to demonstrate features and usage of the Google Maps JavaScript API. |
| 6 | + |
| 7 | +Try the examples out at [Google Maps JavaScript API documentation](https://developers.google.com/maps/documentation/javascript/examples). |
| 8 | + |
| 9 | +## Development |
| 10 | + |
| 11 | +Each example is one atomic unit, for which dependencies must be individually set up. |
| 12 | + |
| 13 | +{# TODO: Write up a description of how these are set up (single example, don't have to build the entire collection, yadda yadda yadda) #} |
| 14 | + |
| 15 | +### Build |
| 16 | + |
| 17 | +1. Run `npm i` to install dependencies; this runs TSC, which compiles the JavaScript. |
| 18 | +1. Run `npm start` to test a single example locally. |
| 19 | + |
| 20 | +### Test |
| 21 | + |
| 22 | +{# TODO: verify these test steps #} |
| 23 | +1. `npm test` Test outputs. |
| 24 | +1. (Optional) `npm run lint` Fix lint issues with `npm run format` |
| 25 | +1. (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>`. |
| 26 | + |
| 27 | +### Run |
| 28 | + |
| 29 | +1. Start a server with a single sample using `npm start`. |
| 30 | + |
| 31 | +## Contributing |
| 32 | + |
| 33 | +Contributions are welcome! Please see [contributing](../docs/contributing.md) for more information. |
| 34 | + |
| 35 | +## Terms of Service |
| 36 | + |
| 37 | +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). |
| 38 | + |
| 39 | +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. |
| 40 | + |
| 41 | +## Support |
| 42 | + |
| 43 | +This library is offered via an open source [license](). 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). |
| 44 | + |
| 45 | +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. |
| 46 | + |
| 47 | +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](). |
| 48 | + |
| 49 | +You can also discuss this library on our [Discord server](https://discord.gg/hYsWbmk). |
0 commit comments