Tangram is a javascript library for rendering 2d & 3d maps in the browser using Web GL. It allows for some pretty complex visualizations of maps that include the use of light sources, shaders, animation, and textures.
Since Tangram supports the Mapbox MVT
tile format, I wanted to try and leverage Esri’s OpenStreetMap Vector Tiles. Check out the app or view the messy code
The map is viewed through the Tangram Leaflet Plugin and reads from a .yaml
that stores the styling. You can add Esri’s OSM tiles like this:
..then add land polygons
..and finally add some country labels
since quite a few layers in the tiles store the main labeling attribute under the column name _name
, you can add a global property at the top of the .yaml
to point your labels to (text_source: global.esri_name
in the above example)
This is a very simple example that doesnt even scratch the surface of Tangram’s capabilities. Check out the code for the entire yaml here
As usual, email me or hit me up on twitter if you want some more details or have any general questions.