Skip to content

meetar/albers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

albers

This map applies a dynamic Albers equal-area conic projection to the Mapzen vector tiles, using the Tangram mapping library.

The Mapzen tiles are first converted from Web Mercator to spherical lat/lng coordinates, and then reprojected into Albers.

Conic projections are specified with a center and two "standard parallels", which are lines of latitude with no distortion - it may be useful to think of these as the intersections of the conic projection with the "sphere" of the earth:

cone-sphere-intersectionl

This map's code adjusts these two standard parallel parameters in real time with the movement of the map, using a vertex shader inside the scene.yaml file.

I've left the edges of the loaded tiles visible so the map's behavior is more obvious.

Live demo: http://meetar.github.io/albers/

The code for this demo may be found in scene.yaml – this file contains all the styling and projection code in a single scene. Another way to set this up would be to make styles which allow a projection to be imported separately – an example of this setup may be seen in the base.yaml and albers.yaml files.

usa

About

Albers projection on a Tangram map

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages