2.20.9 • Published 3 years ago

@googlemaps/js-samples v2.20.9

Weekly downloads
442
License
Apache-2.0
Repository
github
Last release
3 years ago

Build Release GitHub contributors Apache-2.0 Discord

js-samples

Description

Samples for the Google Maps JavaScript API.

The samples can be demoed on the GitHub demo page or at the official documentation site.

Initialize an app from a sample

# install the package
npm i -g @googlemaps/js-samples

# extract a sample to a destination folder
googlemaps-js-samples init map-simple destFolder

# run the sample
cd destFolder
npm i
npm run dev

Replace map-simple with the path to another sample in this repository.

Development

Build

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

Test

  1. npm run lint Optionaly fix lint issues with npm run format
  2. npm test Test outputs.

Run

  1. Start a server with all samples using npm start or bazel run serve (or ibazel for faster live reload)
  2. Start a specific sample with bazel run samples/map-simple:devserver (or ibazel for faster live reload)

Caching

It may be possible to enable remote caching with Bazel to speed builds. This will require running gcloud auth application-default login. This requires access to a specific GCS bucket that most developers do not have.

Inputs and outputs

The following table identifies the inputs and outputs.

FileEditjsFiddleDescription
samples/*/src/index.jsYNJavaScript for sample for JS tab
samples/*/src/index.njkYNHTML template for sample
samples/*/src/style.scssYNSCSS style for sample
shared/layout.njkYNShared HTML template to extend
shared/scss/*YNShared SCSS styles
dist/samples/*/index.htmlNNInline HTML, CSS, JS with development key and transpiled for >1%, ie11
dist/samples/*/iframe.htmlNNInline HTML, CSS, JS for iframe without html, head, body tags transpiled for ie11 and >1%, ie11
dist/samples/*/inline.htmlNNInline HTML, CSS, JS for All tab transpiled for >3%
dist/samples/*/jsfiddle.htmlNYHTML without CSS or JS for in jsFiddle
dist/samples/*/sample.htmlNNHTML without CSS or JS for HTML tab
dist/samples/*/style.cssNYCSS output from SCSS for CSS tab

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.

2.20.8

3 years ago

2.20.9

3 years ago

2.20.6

3 years ago

2.20.7

3 years ago

2.20.4

3 years ago

2.20.5

3 years ago

2.19.2

3 years ago

2.19.0

3 years ago

2.19.1

3 years ago

2.20.2

3 years ago

2.20.3

3 years ago

2.20.0

3 years ago

2.20.1

3 years ago

2.18.3

3 years ago

2.18.1

3 years ago

2.18.2

3 years ago

2.18.0

3 years ago

2.17.2

3 years ago

2.17.3

3 years ago

2.17.0

3 years ago

2.15.2

3 years ago

2.17.1

3 years ago

2.15.3

3 years ago

2.15.1

3 years ago

2.16.1

3 years ago

2.16.0

3 years ago

2.15.0

3 years ago

2.14.1

3 years ago

2.14.0

3 years ago

2.13.5

3 years ago

2.13.4

3 years ago

2.13.3

3 years ago

2.13.2

3 years ago

2.13.1

3 years ago

2.13.0

3 years ago

2.12.7

3 years ago

2.12.8

3 years ago

2.12.6

3 years ago

2.12.5

3 years ago

2.12.4

3 years ago

2.12.3

3 years ago

2.12.2

3 years ago

2.12.1

4 years ago

2.12.0

4 years ago

2.11.0

4 years ago

2.11.1

4 years ago

2.10.7

4 years ago

2.10.5

4 years ago

2.10.6

4 years ago

2.11.2

4 years ago

2.10.4

4 years ago

2.10.3

4 years ago

2.10.2

4 years ago

2.10.1

4 years ago

2.10.0

4 years ago

2.9.2

4 years ago

2.9.1

4 years ago

2.9.0

4 years ago

2.8.3

4 years ago

2.8.2

4 years ago

2.8.1

4 years ago

2.7.0

4 years ago

2.8.0

4 years ago

2.6.6

4 years ago

2.6.5

4 years ago

2.6.4

4 years ago

2.6.3

4 years ago

2.6.2

4 years ago

2.6.1

4 years ago

2.6.0

4 years ago

2.5.6

4 years ago

2.5.5

4 years ago

2.5.4

4 years ago

2.5.3

4 years ago

2.5.2

4 years ago

2.5.0

4 years ago

2.4.2

4 years ago

2.4.1

4 years ago

2.4.0

4 years ago

2.3.0

4 years ago

2.2.2

4 years ago

2.2.1

4 years ago