Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@googlemaps/js-samples

Package Overview
Dependencies
Maintainers
2
Versions
82
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@googlemaps/js-samples

Samples for Google Maps JavaScript

  • 2.5.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
132
increased by1220%
Maintainers
2
Weekly downloads
 
Created
Source

Build Release GitHub contributors Apache-2.0

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

Note: This is a beta feature.

# 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. Use Bazel to build bazel build ... or bazel build //samples/add-map/...
  2. Update dist bazel build public.tar and tar xf bazel-bin/public.tar -C dist

Test

  1. Use Bazel to run tests with bazel test ...
  2. Run the dist diff tests bazel test dist:diff
  3. Run e2e tests npx selenium-standalone install && npx selenium-standalone start and then run bazel test e2e:e2e

Run

  1. Set the environment variable export GOOGLE_MAPS_JS_SAMPLES_KEY=YOUR_KEY.
  2. Start a server with all samples using bazel run serve.

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/*/app.jsNYTranspiled JS for >3%
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][issues]. If you'd like to contribute, please read [How to Contribute][contrib].

Keywords

FAQs

Package last updated on 27 Aug 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc