# WeatherNow **Repository Path**: mirrors_tangrams/WeatherNow ## Basic Information - **Project Name**: WeatherNow - **Description**: OpenWeatherMap experiment with Tangram - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: gh-pages - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-09-26 - **Last Updated**: 2026-03-22 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## Using 3er Party APIs on Tangram This guide provides an example of how to use the [Tangram maps engine](https://github.com/tangrams/tangram) with other 3rd party APIs. It's written for an audience with some technical knowledge about JavaScript, [OpenStreetMap](http://leafletjs.com/) data and [Mapzen vector tiles](https://mapzen.com/projects/vector-tiles). It is best if you have some previous experience editing [Tangram's](https://github.com/tangrams/tangram) [```.yaml``` scene files](https://mapzen.com/documentation/tangram/Scene-file/). In case you don't, don't worry! A good place to start is explore the examples using [TangramPlay](https://mapzen.com/tangram/play/), our online editor, and reading [Tangram Documentation](https://mapzen.com/documentation/tangram/), specially following this nice [walkthrough of how to make a Tangram map](https://mapzen.com/documentation/tangram/walkthrough/#put-your-tangram-map-on-the-web). Also feel free to clone this repository in your computer, run it as a local server and make it your own. Tweaking and modifying is the best way to learn. How? Type this on your command line: ```bash git clone https://github.com/tangrams/OWM.git python -m SimpleHTTPServer 8000 ``` If that doesn’t work, try: ```bash python -m http.server 8000 ``` To view the content on your browser, navigate to: [http://localhost:8000](http://localhost:8000) ***Note:*** Please keep in mind that this example use one free API Key for [OpenWeatherMap service](http://openweathermap.org/api). If you get carried away using it, there is the chance you will run out of calls to the servers. In that case it is probably time to get your own free API key. ### Before starting Take a moment to look the files inside this repository and see how they relate to each other. You will note: - There is a **JS file** (```main.js```) file that loads [Leaflet](http://leafletjs.com/) map and a [Tangram Layer](https://github.com/tangrams/tangram) on top of it. This file also makes API calls to [OpenWeatherMap server](http://openweathermap.org/api), asking for weather station data every time the user finishes moving the map. The responses to this calls are transformed into [GeoJSON](http://geojson.org/) to be passed to [Tangram engine](https://github.com/tangrams/tangram) for rendering and display. - The **YAML file** (```scene.yaml```) is a scene file that will tell Tangram.js how to style the map and make sense of the weather station data. - the **HTML file** (```index.html```) is the glue that holds it all together. It contains a ```