Skip to content

Latest commit

 

History

History

README.md

Ambient Map demo

This web application demonstrates how Ambient light sensor can be used to control style of a map widget. When ambient illuminance level is less than 10 lumen, night mode style will be used.

Alt text

Getting Started

Make sure you have following dependencies installed:

Install NPM dependencies

Install polymer components that are required for the project.

npm install

Viewing Your Application

polymer serve

This will serve application locally. By default, port 8080 will be used (http://localhost:8080/).

Building Your Application

polymer build

This will create a build/ folder with bundled/ and unbundled/ sub-folders containing a bundled (Vulcanized) and unbundled builds, both run through HTML, CSS, and JS optimizers.

You can serve the built versions by giving polymer serve a folder to serve from:

polymer serve build/bundled

Deploying to App Engine

gcloud app deploy app.yaml -v VERSION --project PROJECT_NAME
  • VERSION should be the version of your application, if omitted, it will be autogenerated.
  • PROJECT_NAME should be the name of App Engine project.

You could check deployed demo of the web application at https://ambientmap.appspot.com/ or pre-built application here

Google Maps API key

If you want to modify and test this demo application, you have to use your own Google Maps JavaScript API key. Once you have an API key, please update it for mapApiKey property in src/ambientmap-app.html file.