Skip to content

UIKit0/tangram

 
 

Repository files navigation

Tangram: WebGL for OpenStreetMap

Circle CI

Tangram is a library for rendering 2D & 3D maps with WebGL, using GeoJSON/TopoJSON or binary vector tiles.

Vector Tiles

Instead of using traditional image tiles, we render from vector tiles that contain the underlying source geometry for each tile's bounding box.

Mapzen provides a free vector tile service that can be used with Tangram for OpenStreetMap base layer data, with worldwide coverage updated daily. There is also an OSM.US-hosted alternative.

Tangram currently supports GeoJSON/TopoJSON tiles as well as the mapnik binary format, both of which can be generated by the Mapzen vector tile service.

Here's an example GeoJSON tile.

The library also includes a Leaflet plugin, Tangram.LeafletLayer, to provide basic web map pan/zoom functionality.

Installation

npm install
make

The library will be minified in dist/, and index.html provides an example for rendering from different sources and simple Leaflet integration.

Examples

Test

To run all of the tests.

npm test

Every time this runs, an new browser instance is created. If you wish to have a single browser instance and run the test suite against that instance do the following,

make karma-start

And then run the tests with,

make run-tests

Lint

We use jshint to maintain code quality

make lint

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 98.7%
  • Other 1.3%