All Projects → tangrams → Tangram

tangrams / Tangram

Licence: mit
WebGL map rendering engine for creative cartography

Programming Languages

javascript
184084 projects - #8 most used programming language
GLSL
2045 projects
HTML
75241 projects

Projects that are alternatives of or similar to Tangram

Mapbox Gl Js
Interactive, thoroughly customizable maps in the browser, powered by vector tiles and WebGL
Stars: ✭ 8,017 (+308.2%)
Mutual labels:  webgl, vector-tiles, map
Svg.skia
An SVG rendering library.
Stars: ✭ 122 (-93.79%)
Mutual labels:  rendering, vector-graphics
Node Tileserver
A lightweight tileserver based on NodeJS for serving bitmap and vector tiles.
Stars: ✭ 148 (-92.46%)
Mutual labels:  vector-tiles, leaflet
Skia Wasm Port
Port of the Skia drawing library to wasm, for use in javascript (node & browser)
Stars: ✭ 131 (-93.33%)
Mutual labels:  webgl, rendering
Wechart
Create all the [ch]arts by cax or three.js - Cax 和 three.js 创造一切图[表]
Stars: ✭ 152 (-92.26%)
Mutual labels:  webgl, rendering
Flutter map marker cluster
Provides beautiful animated marker clustering functionality for flutter_map. Inspired by Leaflet.markercluster
Stars: ✭ 101 (-94.86%)
Mutual labels:  map, leaflet
Herebedragons
A basic 3D scene implemented with various engines, frameworks or APIs.
Stars: ✭ 1,616 (-17.72%)
Mutual labels:  webgl, rendering
Leaflet.labeltextcollision
Leaflet.LabelTextCollision is a LeafletJS plug-in to display labels on vector data while avoiding label collisions.
Stars: ✭ 65 (-96.69%)
Mutual labels:  map, leaflet
Jeelizglassesvtowidget
JavaScript/WebGL glasses virtual try on widget. Real time webcam experience, robust to all lighting conditions, high end 3D PBR rendering, easy to integrate, fallback to server-side rendering
Stars: ✭ 134 (-93.18%)
Mutual labels:  webgl, rendering
Vue2leaflet
Vue 2 components for Leaflet maps
Stars: ✭ 1,809 (-7.89%)
Mutual labels:  map, leaflet
Svglib
Read SVG files and convert them to other formats.
Stars: ✭ 139 (-92.92%)
Mutual labels:  rendering, vector-graphics
Bgfx
Cross-platform, graphics API agnostic, "Bring Your Own Engine/Framework" style rendering library.
Stars: ✭ 10,252 (+422%)
Mutual labels:  webgl, rendering
Helixjs
A Javascript 3D game engine.
Stars: ✭ 84 (-95.72%)
Mutual labels:  webgl, rendering
Phenomenon
⚡️ A fast 2kB low-level WebGL API.
Stars: ✭ 1,551 (-21.03%)
Mutual labels:  webgl, rendering
Quizzity
A fast-paced geography quiz
Stars: ✭ 80 (-95.93%)
Mutual labels:  map, leaflet
Hilo3d
Hilo3d, a WebGL Rendering Engine.
Stars: ✭ 123 (-93.74%)
Mutual labels:  webgl, rendering
Mapbox.js
Mapbox JavaScript API, a Leaflet Plugin
Stars: ✭ 1,819 (-7.38%)
Mutual labels:  map, leaflet
Procedural Gl Js
Mobile-first 3D mapping engine with emphasis on user experience
Stars: ✭ 1,036 (-47.25%)
Mutual labels:  webgl, map
Leaflet Ng2
Angular.io integration of Leaflet
Stars: ✭ 66 (-96.64%)
Mutual labels:  map, leaflet
Mapbox Gl Native Android
Interactive, thoroughly customizable maps in native Android powered by vector tiles and OpenGL
Stars: ✭ 135 (-93.13%)
Mutual labels:  vector-tiles, map

Tangram: WebGL Maps for Vector Data

Circle CI

tangram-header

Tangram is a JavaScript library for rendering 2D & 3D maps live in a web browser with WebGL. It is tuned for OpenStreetMap but supports any source of GeoJSON/TopoJSON or binary vector data, including tilesets and single files.

Here's a simple demo (repo here) with a basic example of a Tangram map.

Tangram is instantiated as a Leaflet plugin for integration with standard web maps. Tangram ES is a native mobile version of the Tangram library, written in C++.

Getting Started

Tangram is published in two build flavors: one for current browsers (bundled as an ES module, using modern JS and web platform features), and one for older browsers (specifically IE11, with modern JS transpiled to older ES5 syntax). You can use this snippet to automatically load the best one for your browser, using the module/nomodule pattern:

<!-- modern browsers load the optimized .mjs file, older browsers (IE11) load the transpiled .js file -->
<script type="module" src="https://unpkg.com/tangram/dist/tangram.min.mjs"></script>
<script nomodule src="https://unpkg.com/tangram/dist/tangram.min.js"></script>

Note: Because scripts with the module type automatically load in "deferred" mode, you must make sure to include the defer keyword for any scripts you load that depend on Tangram (so that they won't run until Tangram is finished loading). For example, if your app code is in index.js, load it like this (anywhere after the Tangram <script> tag):

<script defer src="index.js"></script>

Specific Tangram library versions can also be loaded with @version syntax(see unpkg for details). Versions earlier than v0.16.0 do not use the module syntax; use a single script tag to load them instead: <script src="https://unpkg.com/[email protected]/dist/tangram.min.js"></script>.

Tangram is published on NPM and can be bundled using import or require.

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

Data sources, layers, and styling rules are written in a scene file (here's an example). Armed with a scene file like scene.yaml, you can create a Tangram scene and add it to a Leaflet map like so:

var map = L.map('map');
var layer = Tangram.leafletLayer({ scene: 'scene.yaml' });
layer.addTo(map);

Read on for more info, or see the documentation (github repo).

Demos

simple-demo - A minimal demo showing the basic setup

highways-demo - Zoom-dependent styles and contextual filtering rules

gui-demo - Control styles in real-time with a gui

shaders-demo - Simple glsl shaders

Tangram-sandbox - More complex glsl shaders

More examples are available here.

Vector Tiles

Instead of loading traditional bitmap tiles, Tangram draws its own tiles from scratch, based on vector tiles that contain the source data.

Nextzen provides a free vector tile service based on open data from OpenStreetMap, Natural Earth, Who's On First and other projects, with worldwide coverage updated continuously -- sign up for an API key here.

Tangram currently supports GeoJSON & TopoJSON-based tiles, as well as Mapbox's MVT binary format.

Styling

The scene file is where you specify data sources and layers, filter the data, and define and apply styles. (In our demos, this file is named scene.yaml.) The rules for doing these things are many and various, but the basics are pretty easy, and they are all meticulously documented in the Tangram Documentation.

The scene file is written in YAML, which is a data-serialization format like JSON, but with less punctuation. Instead, data structures are specified with whitespace, like Python. One neat side benefit is that the format is super friendly to strings, which means you can write inline JavaScript and GLSL code straight into the scene file, without needing to wrap it in quotes or concatenate anything.

Support

For technical reference and concept overviews, see the Tangram Documentation.

For questions, comments, suggestions, or to report a bug, please open a new issue.

You can also find us in the Tangram-chat gitter room: https://gitter.im/tangrams/tangram-chat

Browser Support

Tangram JS is officially supported and tested on the last two versions of these browsers:

  • Mac OS: Chrome, Firefox, and Safari
  • Windows: Chrome, Firefox, IE11, and Edge
  • iOS: Safari
  • Android: Chrome

Tangram JS should also run in any browser with WebGL support.

Contributions Welcome

Tangram is open-source, and we eagerly welcome feedback, feature requests, and contributions. We’re especially interested to see your maps, no matter how simple! Post screenshots, links, and any questions to our gitter chat.

For instructions, see CONTRIBUTING.md.

Tangram JS was created by Mapzen and is now a Linux Foundation Project.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].