Leaflet.TileLayer.GL Tropical demo

X:
Y:
Zoom:

In this demo, a WebGL shader takes the black-and-white "toner" map style by Stamen and conditionally replaces the color to highlight the tropics and arctic circles.

This demo uses aCRSCoords instead of aLatLngCoords. In the source code, the latitudes 22.5 and 66.5 are replaced with the Y-coordinates 2571663 and 10015051.

If the LatLng coordinates were used instead, the tropics and arctic circles would shift their position between zoom levels 0 and 5. This is due to WebGL doing a linear interpolation of the lat-lng coordinates for the bounds of each tile.